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

ENH: support mask keyword for compatibility with Fiona #277

Closed
brendan-ward opened this issue Aug 31, 2023 · 3 comments · Fixed by #285
Closed

ENH: support mask keyword for compatibility with Fiona #277

brendan-ward opened this issue Aug 31, 2023 · 3 comments · Fixed by #285
Labels
enhancement New feature or request
Milestone

Comments

@brendan-ward
Copy link
Member

Current plan is to use bounding box of mask when reading features with GDAL, then filter using shapely.

The issue is that OGR will give different results if GEOS is or is not compiled into GDAL. Using shapely afterward ensures precise results.

@brendan-ward brendan-ward added the enhancement New feature or request label Aug 31, 2023
@brendan-ward brendan-ward added this to the 0.7.0 milestone Aug 31, 2023
@jorisvandenbossche
Copy link
Member

Can we detect when the GDAL in use in compiled with GEOS or not? (I suppose if get_gdal_geos_version() is not None?) Because otherwise we could let it depend on that whether we do an additional check with shapely or not?

Other question is also whether we want to do this in pyogrio, or just in geopandas.read_file (where we could pass the bbox to pyogrio, and do the remaining filtering there).

@martinfleis
Copy link
Member

Other question is also whether we want to do this in pyogrio, or just in geopandas.read_file (where we could pass the bbox to pyogrio, and do the remaining filtering there).

The more code that can live in pyogrio, the better I suppose. Then you know where to look when the issue comes up.

@theroggy
Copy link
Member

theroggy commented Sep 1, 2023

I suppose it is, otherwise it probably wouldn't have come up, but is it a common case that gdal is built without geos? If not, just raising an "unsupported" exception or log a warning if geos is not available might be enough?

I had a look at the docker images, and if read correctly it is included in >= ubuntu-small and >= alpine-normal, so only not in alpine-small. Alpine-small is - I suppose by purpose - really small, so has quite limited support for anything, so not sure if that is the bar to aim for.

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

Successfully merging a pull request may close this issue.

4 participants