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).
This refactors and completes the recently added work on random number raster layer creation algorithms (see #35835) and reworks the single algorithm implementation proposed in #36065 to a base-algorithm solution which avoids duplicate code.
With the new algorithms aimed towards distribution based random number creation, QGIS reaches to the same level of functionality as current ArcGIS random raster creation tools. In total, the PR adds the following algorithms (normal and uniform raster layer creation algs are refactored to be in line the new naming scheme):
Create random raster layer (binomial distribution)
Create random raster layer (exponential distribution)
Create random raster layer (gamma distribution)
Create random raster layer (negative binomial distribution)
Create random raster layer (normal distribution)
Create random raster layer (poisson distribution)
Create random raster layer (uniform distribution)
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).
- Based colours and sizes on mAlgorithmDelaunay.svg
- Renamed from mAlgorithmKNearestConcaveHull.svg to mAlgorithmConcaveHull.svg to be more general
- Applied to ConcaveHull.py also to indicate similarity between algorithms