3 ms·
I think stackoverflow is better for this specific question. Having said that most databases (on the backend) have spatial extension where you can run queries l
by mtmail 12y ago
I think stackoverflow is better for this specific question.
Having said that most databases (on the backend) have spatial extension where you can run queries like 'where inside(point,geometry)'. So you create a bounding box or circle around the user, then run a query. That's faster than calculating distances between all users. The databases have special indices for geographic lookup.
Both point and geometry probably need to be specified in WKT format.
http://www.gaia-gis.it/spatialite-2.1/SpatiaLite-manual.html http://www.gaia-gis.it/spatialite-2.1/SpatiaLite-manual.html
http://docs.mongodb.org/manual/applications/geospatial-indexes/ http://docs.mongodb.org/manual/applications/geospatial-index...