What is range of Cloudant geospatial point's nearest neighbour search -


i using cloudant db geospatial index. cloudant has nearest neighbor search point. has parameter limit no of results. range of nearest neighbor. have requirement search in 500 mts. how can achieve same in cloudant.

you can specify range combining nearest neighbor parameter geometry parameter. example, following query find docs within 500 meters of specified lat/long:

https://account.cloudant.com/yourdatabasename /_design/yourdesigndocname/ _geo/yourgeoindexname ?lat=37.41511369 &lon=-122.2099019 &radius=500 &relation=contains &nearest=true 

more information:

https://docs.cloudant.com/geo.html

update: sure add &relation=contains ensure results include locations within radius. have updated example above. if relation not included nearest neighbor return "all geojson documents in database order measured distance query point."

see documentation other relation types (i.e. contains, crosses, overlaps, etc.)


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -