Open eyeseast opened 2 years ago
Depending on the size of the dataset, this might run into the max rows setting.
This probably has to be SpatiaLite only, and might be worth requiring a spatial index.
What's the best way to do a bbox query? Some comparisons:
This has to work with any geometry type, so I can't assume anything about the geometry
itself.
Here's how datasette-leaflet-freedraw does it: https://github.com/simonw/datasette-leaflet-freedraw/blob/main/datasette_leaflet_freedraw/__init__.py#L26-L62
Right now, I run a query and the map fits the bounds of the returned features. But, if I have a bounding box, I could go the other way and search features within that box. This is especially fast if I have a spatial index.