Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add variance to the number of geometries/components in multipoint/multilinestring/multipolygon generator #1173

Draft
wants to merge 4 commits into
base: branch-23.08
Choose a base branch
from

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 join this conversation on GitHub. Already have an account? Sign in to comment
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