magellan icon indicating copy to clipboard operation
magellan copied to clipboard

Query for proximity search in a radius to find n-nearest

Open danfran opened this issue 9 years ago • 4 comments

Is it possible with the current API (I didn't find a way yet), given a Lat/Lon (WGS84) point "A" and a set of similar coordinates, find for a specific radius (e.g.: 1 Mile) the first 100 nearest points around "A"?

In case it helps, in Mongo would be similar to: db.myData.find({ "location.coordinates" : { $near : { $geometry: { type: "Point", coordinates: [ 52.4702062,-0.2836129 ] }, $minDistance: 0, $maxDistance: 1600 } }, limit:100 })

danfran avatar Jan 29 '16 17:01 danfran

@danfran , we haven't added the distance measure to the API yet. It is in one of the branches and we will cut a new release within the next 3 weeks which should have this feature.

harsha2010 avatar Jan 29 '16 17:01 harsha2010

Did this feature make it to release harsha2010:magellan:1.0.4-s_2.11 ?

pvanickova avatar Jul 19 '17 09:07 pvanickova

I'm also curious whether this is an undocumented or upcoming feature. Thank you!

jak2030 avatar Sep 11 '17 18:09 jak2030

@jak2030 @pvanickova i haven't added this yet..nearest neighbor search is targeted for 1.0.6 (as it needs indexing to do this efficiently) I am working on nearest neighbor search this week, I expect a first cut PR to be ready in a week What is your use case? Are you willing to share some data to test and benchmark performance on? How many points do you need to compute kNN on, for example? What kind of resource constraints? Better yet, your use case description would be great as it will help in designing the algorithm

harsha2010 avatar Sep 11 '17 19:09 harsha2010