anboralabs / spatia-room

Implementation of spatia lite database to android component Room
MIT License
41 stars 4 forks source link

Using ST_Intersect with GeomFromGeoJSON is very slow. #33

Closed arshdoda closed 1 year ago

arshdoda commented 1 year ago

I am using this library for filtering point,line and polygon using the intersection of bounding box and geojson data. ST_INTERSECTS(GeomFromGeoJSON(g), GeomFromGeoJSON('$bbox')) LIMIT 100. Its very slow for complex multipolygons. If i change the LIMIT to 5. it works fine

dalgarins commented 1 year ago

@arshdoda maybe is the way how you are implementing the query, if you want share a repo with a sample implementation with the issue, I will review that.

dalgarins commented 1 year ago

also there is some information useful to you: https://groups.google.com/g/spatialite-users/c/pzW8TArb4rQ