OvertureMaps / overturemaps-py

overture-py
MIT License
125 stars 17 forks source link

Add support for bbox filtering when reading generated parquet files #40

Open songololo opened 1 month ago

songololo commented 1 month ago

When opening an overturemaps-py generated geoparquet file from geopandas it isn't possible to filter by bounding box:

For example, this:

gpd.read_parquet(str(input_path.resolve()), bbox=bounds_buff.bounds)

Throws this:

ValueError: Specifying 'bbox' not supported for this Parquet file (it should either have a bbox covering column or use 'point' encoding).

It would be extremely useful if generated geoparquet files supported this functionality to assist with targeted gpd.read_parquet reads for a given bbox.

songololo commented 1 month ago

Pull request proposed for fixing this behaviour: https://github.com/OvertureMaps/overturemaps-py/pull/41