This class implements an optimised method for generating a profile
from a raster layer in a thread-safe way:
On the main thread:
- The data provider is cloned during preparation, and all other
required properties from the raster layer are copied and stored
for later thread-safe use on a background thread
On the background thread:
- The profile line is transformed to the raster's native CRS
- We then iterate over the portion of the raster which intersects
the profile line's bounding box in small tiles. We use small tiles
here as we will shortcut by skipping straight over any tiles which
don't intersect the profile line at all, without requesting their
raster data at all. Since the profile line will only cover a very
small portion of an overall raster extent, by using small tiles
we end up shortcutting and avoiding the costly tile pixel iteration
for most of the raster's coverage.
- For any tiles which DO intersect the profile curve, we fetch the
tile data and then iterate over the pixels, keeping only those
which actually intersect the profile curve. These pixel centroids
are then transformed back to the original CRS of the profile line.
- After collecting the filtered pixels centroids and their raster
(height) values, we then convert the pixel x/y locations to a
distance/chainage along the profile line, giving us an array of
distance vs height values for all pixels which intersect the profile
line.
- Adds an abstract base class for profile generators,
QgsAbstractProfileGenerator. This is modeled off the approach
used by map layer renderers, where a QgsAbstractProfileGenerator
subclass object is created in the main thread and does all
required (hopefully inexpensive!) preparation steps necessary
to do on the main thread. Then a separate background thread can
later call the virtual generateProfile method, which does
the heavy lifting of calculating the associated profile. Later
the results of the profile generation can be retrieved back
on the main thread.
- Adds an interface "QgsAbstractProfileSource" for objects which
can create a profile generator given a QgsProfileRequest. Map layer
classes will implement this interface, but potentially 3rd party
(plugin based) objects can also implement the interface if they
also want to add custom results to the profile charts (e.g.
borehole trace lines).
windows and docks between sessions"
If checked for a project, then any opened attribute tables will be
saved into the project and immediately restored when loading that
project.
Designed to improve workflows when a user has constructed a project
with a particular set of attribute table configurations for their
requirements, and re-setting up these attribute tables is a hassle.
"Remember editable layer status between sessions"
If checked, then any layers which are editable will be remembered
when saving that project and immediately made editable whenever
the project is restored.
This is an opt-in, per-project setting. The intended use case
is for users who are making complex, data-editing focused projects.
for dissolve algorithm
If enabled, this option will cause disjoint features and parts to
be exported as separate features (instead of as parts of a
single multipart feature).
means when the line anchor is < 25% then it will be matched to the
start of the text, when the line anchor is > 75% it will be matched
to the end of the text, otherwise match to center of text