Finding nearest street given a lat-long location

旧巷老猫 提交于 2019-11-29 14:35:35

问题


Is there any such API where given a location (in terms of latlong), I could find whether the given point is on road/street or not. And if possible also gives me nearest street/road to that location. I found API from [Find nearby Streets] -> http://www.geonames.org/maps/us-reverse-geocoder.html#findNearbyStreets , but it just gives solution for US. Help me if u know of any better solution/algorithm. ( I am particularly interested in India.)


回答1:


You can use the Google Maps Geocoding API which does exactly that: https://developers.google.com/maps/documentation/geocoding/intro

Take a look at the "Reverse Geocoding" section.




回答2:


Google maps api provides reverse Geocoding api, you need to pass lat and long values to get address

http://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452&sensor=true_or_false

Check this http://code.google.com/apis/maps/documentation/geocoding/#JSON




回答3:


Much simpler with OSRM (nearest) webservice. Look at my answer here:

https://stackoverflow.com/a/30403046/4640499



来源:https://stackoverflow.com/questions/6582479/finding-nearest-street-given-a-lat-long-location

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!