rapidsai / cuspatial

CUDA-accelerated GIS and spatiotemporal algorithms
https://docs.rapids.ai/api/cuspatial/stable/
Apache License 2.0
612 stars 154 forks source link

[FEA]: `point_in_polygon` doesn't use `GeoArrow` style offsets #829

Closed thomcom closed 1 year ago

thomcom commented 1 year ago

Closed by #973

Is this a new feature, an improvement, or a change to existing functionality?

Improvement

How would you describe the priority of this feature request

Medium

Please provide a clear description of problem you would like to solve.

point_in_polygon was written before GeoArrow. It's offset buffers are only length n for a Feature with n geometries, but GeoArrow has the tail n+1 offset. We need to update point_in_polygon to match GeoArrow.

Describe any alternatives you have considered

No response

Additional context

No response

harrism commented 1 year ago

I would say this is true of all of our existing polygon APIs. e.g. polygon_bounding_boxes. Remind me again why Arrow needs n+1 storage for n items?

thomcom commented 1 year ago

It stores the final "end position", instead of letting the user assume that it is "length of data buffer offsets refer to minus the size of the final offset". This makes it so that special logic is not required for the end segment when iterating, but that's as much as I can guess why.

thomcom commented 1 year ago

This is closed by #973