Is there a web service available which on providing a Latitude and Longitude can give the nearest road with its type i.e. whether the road is a highway or district road?

Google reverse geo-coding just gives type route but no further classification.

  • I have never used it before, but I think you can use the Overpass API. I saw some examples where you can search for roads by a bounding box, but you could get that by making a small buffer around your point and getting the extent. I'm not sure what kind of attributes you can get back though.
    – crmackey
    Jul 27, 2016 at 15:23
  • Geonames might be your solution example api.geonames.org/…
    – Mapperz
    Jul 27, 2016 at 17:23

1 Answer 1


You could use the 'nearest' endpoint of GraphHopper. Then once you have the road ('edge') you can fetch all properties you stored before e.g. the name or with this pull request also the type.

Or do you mean something like map matching? (Note, I'm the author of the GraphHopper routing engine)

Another possibility is a reverse geocoder which includes this information e.g. photon as "osm_key":"highway","osm_value":"tertiary"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.