How to get Maxspeed allowed for latitude & longitude with certain radius?

我的未来我决定 提交于 2019-12-25 18:28:03

问题


I'm developing android app which has a functionality to display maxspeed allowed for current location (in other words latitude & longitude). I have came across this solution Query Overpass turbo by latitude longitude which gives maxspeed value for location using overpass turbo but it is not working for all locations. I have created JSON request https://overpass-api.de/api/interpreter?data=[out:json];way[maxspeed](around:1.0,52.004940, 4.369381);out tags; using query & it returns max speed tag within json data but it is not working for all locations .

Here is example of blank data i got from these url : Blank data

Any help would be appreciated . This app is going to be launched in US & Europe so, if solution is specific to these locations also welcome. But hope for generic solution.


回答1:


There isn't even a single way at lat 46.361115, lon 6.13975 within a radius of 1 meter: https://www.openstreetmap.org/?mlat=46.361115&mlon=6.13975#map=19/46.36111/6.13975

Either change your coordinates or increase the search radius.

Also as user Jendrusk already noted not every street has a maxspeed in OSM set. The city Divonne-les-Bains from your example has only few roads with a maxspeed tag: http://overpass-turbo.eu/s/o48



来源:https://stackoverflow.com/questions/43200612/how-to-get-maxspeed-allowed-for-latitude-longitude-with-certain-radius

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