cuspatial icon indicating copy to clipboard operation
cuspatial copied to clipboard

Select with bounding box on a cuspatial.GeoDataFrame?

Open thuydotm opened this issue 2 years ago • 2 comments

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

thuydotm avatar Aug 08 '22 12:08 thuydotm

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.

thomcom avatar Aug 11 '22 17:08 thomcom

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.

github-actions[bot] avatar Sep 10 '22 22:09 github-actions[bot]