Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Conversation

@isVoid
Copy link
Contributor

@isVoid isVoid commented Jun 2, 2023

Description

This PR closes #1161

This PR adds normal distribution to the number of points, linestrings and polygons in the geometry generators. The generator API hasn't change, the parameters structs are now strongly typed with two different types: multipoint_normal_distribution_generator_parameter and multipoint_fixed_generator_parameter. The latter inherits the former because fixed output is a special case of normal distribution with stddev==0.

In the fixed generator case, the generator behave as it is today - every pair has exactly the same number of geometry per pair.

In the normal distribution generator case, each of the count parameter is treated as the mean of the distribution and sampled with a normal distribution, an additional stddev parameter is provided to control the variance. (Note that the count of geometry is always greater or equal to 1).

In this current draft PR, by setting num_point_per_multipoint=30, stddev=5, I can generate a multipoint_array with the number of point per multipoint with the following distribution:

image

stddev=0
image

stddev=20
image

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

…ibution to the number of point per multipoint
@github-actions github-actions bot added the libcuspatial Relates to the cuSpatial C++ library label Jun 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

libcuspatial Relates to the cuSpatial C++ library

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

[FEA]: Add finer control to the distribution of geometries array generated by geometry_generator

1 participant