rapidsai / cuspatial

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

Select with bounding box on a cuspatial.GeoDataFrame? #635

Open thuydotm opened 2 years ago

thuydotm commented 2 years ago

Is your feature request related to a problem? Please describe. I wish I could select with bounding box on a cuspatial.GeoDataFrame.

Describe the solution you'd like Providing 4 values of xmin, xmax, ymin, and ymax, we can do .cx[xmin : xmax, ymin : ymax] to return the full series/frame of geometries that are within or intersect with the bounding box.

Describe alternatives you've considered With GeoPandas, I can do .cx(xmin : xmax, ymin : ymax)

Additional context https://geopandas.org/en/stable/docs/reference/api/geopandas.GeoDataFrame.cx.html

thomcom commented 2 years ago

This can be done with existing APIs as well, after you've gotten min and max you can use point_in_polygon with the bounds as the polygon.

github-actions[bot] commented 2 years ago

This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.