geopandas / pyogrio

Vectorized vector I/O using OGR
https://pyogrio.readthedocs.io
MIT License
260 stars 22 forks source link

ENH: Add support for mask parameter #285

Closed brendan-ward closed 9 months ago

brendan-ward commented 10 months ago

Resolves #277

Adds mask parameter to read, read_dataframe, open_arrow, and read_bounds.

This takes an easier path to supporting geometries than Fiona (which supports GeoJSON-like inputs). This requires Shapely Geometry objects, and internally converts them to WKB to create the geometry within GDAL.

I have not finished checking compatibility with other parameters, like where or sql.

I am currently seeing inconsistent behavior when using Arrow, where it will return more results than expected for GPKG.

brendan-ward commented 10 months ago

GDAL Arrow bug logged at: https://github.com/OSGeo/gdal/issues/8347

This affects both bbox and mask filters when using Arrow for both GPKG and FlatGeobuf.

normanb commented 10 months ago

@brendan-ward there has been quite a few commits to GDAL master regarding Arrow filtering. I have been using pyogrio with TileDB in GDAL (which supports arrow) and I am 👍 on adding mask support.