A solution would be to benchmark the polygon query and bounding box implementation for points and shapes and see if one is significantly faster than the other. Ideally the polygon query is fast enough and we can drop the bounding box query implementation for points and shapes.
Note that polygon query implementation for raster types is simply calling the implementation of bounding box query for raster types; this will not change.
I add also that it would be interesting to benchmark the code against pure geopandas code, to see if the spatialdata code introduces some bottlenecks. I suspect that the code in spatialdata is slightly slower, but by enabling spatial partitioning on write by default, we could obtain that, when writing and reading the data, we actually get a performance improvement over vanilla geopandas.
Originally posted by @LucaMarconato in #669
I add also that it would be interesting to benchmark the code against pure
geopandas
code, to see if thespatialdata
code introduces some bottlenecks. I suspect that the code inspatialdata
is slightly slower, but by enabling spatial partitioning on write by default, we could obtain that, when writing and reading the data, we actually get a performance improvement over vanilla geopandas.