This algorithm calculates the rotation required to align point features
with their nearest feature from another reference layer. A new field is
added to the output layer which is filled with the angle (in degrees,
clockwise) to the nearest reference feature.
Optionally, the output layer's symbology can be set to automatically
use the calculated rotation field to rotate marker symbols.
If desired, a maximum distance to use when aligning points can be set,
to avoid aligning isolated points to distant features.
Designed for use cases like aligning building point symbols to follow
the nearest road direction!
Offers the same functionality as the Random points inside polygons
algorithm, and in addition it includes (possible to opt-out) the attributes
from the containing polygon and the ability to specify a seed for the random
number generator.
Could replace the Python algorithm Random points inside polygons, but
this C++ implementation only supports "Points count" ("number of points
for each feature") directly, while "Points density" is supported by allowing the
point count to be data defined (using the polygon area to calculate the
number of points).
running GDAL algorithms
If a subset string is set, we must export the subset of the layer
for use by the GDAL command*
Fixes#35981
* well, we probably **should** just build the gdal command to include
the SQL definition of the subset filter, but that's non-trivial, so
this fix is a good simple solution for now
The Random points on lines algorithm supplements the existing "Random points along line" algorithm, and will prove to be more useful to the majority of users than the "original".
Features:
The points are distributed randomly over the lines based on "along the line" distance, meaning that the distribution of the points will be flat over the length of the line (each place on the feature has the same probability of being "hit").
The Random points along line, on the other hand, uses a line segment based approach, meaning that the density will depend on the segment length (short segments will have a higher point density than longer ones).
When an algorithm returns this flag, and after executing it in a model it doesn't set a
certain output which remaining model algorithms depend on, then these branches are
pruned back and don't get executed for the model run.
Allows for creation of algorithms which impact the overall model flow.
This algorithm filters features by their geometry type. Incoming
features will be directed to different outputs based on whether
they have a point, line or polygon geometry.
Allows for model creation which responds to different input
layer geometry types by applying different logic depending on the
input geometry type.