Hello: I want to find the closest way to a point defined by its geographic coordinates. I found out Overpass API which gave me a list of ways near a point. But I would like having one and only way. Thank you. asked 23 Feb '15, 16:19 osmccecsg aseerel4c26 ♦ |
Sorting based on distance using Overpass API is already discussed in a Github issue, see [1] and [2]. Unfortunately, this feature is not yet available at this time. I would suggest that you add this use case to the mentioned ticket (i.e. sorting by distance combined with top 1 result), so it doesn't get lost and could be considered for future development. For the time being, you'd need to use your own logic and post process the Overpass API result to return the closest way only. answered 23 Feb '15, 22:25 mmd |
that is the same question (if I assume you mean walkable/driveable "ways") as given-a-lat-lon-is-it-possible-to-find-the-closest-highwaystreet-record (or the linked questions there), isn't it? Update: ah, okay, specifically with Overpass here …