Create Random Points

This node generates random points from a uniform distribution within (or along) each input geometry. For polygons, the points will be sampled within the area of the polygon. For lines, they will be sampled along the length of the LineString. For multi-part geometries, the weights of each part are selected according to their relevant attribute (area for Polygons, length for LineStrings), and then points are sampled from each part. Any other geometry type (e.g., Point, MultiPoint, GeometryCollection) is ignored, and an empty MultiPoint geometry is returned.

The numerical value column is used to determine the number of points to be generated for the geometry of the same row. Additionally, you need to provide an ID column that will be used to identify the original input row.

The node will create a new MultiPoint geometry that includes the random set of points for each input geometry, which can be exploded into individual points using the Multipart To Singlepart node.

The node is based on the GeoPandas project and uses the following related information and functions:

Options

Geometry column

Select the geometry column to transform.

Number of points column

Select the column for the number of points to draw.

Use random seed

I selected you may enter a fixed seed here to get reproducible results upon re-execution. If you do not specify a seed, a new random seed is taken for each execution.

Seed

A seed to initialize the random number generator.

Output

Group of settings that define the format of the result table.

Output column

Choose where to place the result column:

Available options:

  • Replace: Replace the selected input column with the result.
  • Append: Append a new column with the name provided below.
New column name

The name of the new column that is appended if 'Append' is selected.

Input Ports

Icon

Table with geometry column.

Output Ports

Icon

Table with transformed geometry column.

Popular Predecessors

  • No recommendations found

Popular Successors

  • No recommendations found

Views

This node has no views

Workflows

  • No workflows found

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.