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

BufferedGeozeroDatasource for spatial filtering on reading #197

Open
kylebarron opened this issue Feb 12, 2024 · 0 comments
Open

BufferedGeozeroDatasource for spatial filtering on reading #197

kylebarron opened this issue Feb 12, 2024 · 0 comments

Comments

@kylebarron
Copy link
Member

It's often desired to prevent materialization of data features outside of some spatial region, usually a bounding box. Some formats, like FlatGeobuf, GeoPackage, and Shapefile, have a native implementation of spatial filtering, but others, like CSV, GeoJSON, GeoJSON Lines, don't have any built-in method to the format.

A simple way to handle this spatial filtering in general would be to implement a BufferedGeozeroDatasource. It would wrap a general GeozeroDatasource and its constructor would include a bbox parameter. It would buffer up to one feature, determine whether the geometry intersects the input bbox, and if so, propagate that feature on to the consumer.

I'm interested in implementing this kind of thing for the geoarrow crate but it might be general enough to live in the geozero crate. Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant