0

How can i determine if a given point(lat,lon) is in a road segment or not?

Further explanation on what i want to achieve :

I have a reference point(lat1,lon1). I determine a circle with a radius of 30 meters, and a center (lat1, lon1). if want to know if this circle intersect roads.

do i have to use more than the OSM DB (wms service to get feature and compute intersection?)

Ernest Friedman-Hill
  • 80,601
  • 10
  • 150
  • 186

1 Answers1

2

You can do something like that with the Overpass API. You'll need the around-query. The syntax looks like the following:

way(around:<radius>,<lat>,<lng>);

…or take a look at this example.

tyr
  • 1,779
  • 1
  • 15
  • 15