mongodb - Best way query a database for nearby lat/longs? -
mongodb - Best way query a database for nearby lat/longs? -
i have set or lat/longs stored in db. want query db , homecoming documents within range of lat/long. know how determine distance between 2 sets don't want have every entry in db. best way accomplish this?
thanks much.
perhaps utilize geospatial indexing accomplish this...
if that's no good, built node.js addon perform nearest neighbour searches called node-kdtree. used find closest n points, , quick since wrapper underlying c library. sounds poor selection needs because have pull of info out of db first in order process it. limited info have, suggest seek using built-in functionality of mongodb first.
database mongodb node.js geolocation geospatial
Comments
Post a Comment