How to query OSM from the server

家住魔仙堡 提交于 2020-01-07 03:06:10

问题


Is there any way to connect to the web server of OpenStreetMap?

I want to receive the speed limit information given a geoLoc "lat and Lon". I thought of solving this issue by creating a huge database encompases the node's lat and lon and the speed limit and then query the speed limit given a specific geoLoc.

but now i am wondering is it possible to connect directly the OSM server and query the speed limit given a specific geoLoc?! whic approach is more efficient?


回答1:


You can use Overpass API for querying (almost) any information. The language guide even has a very similar problem to yours: querying for name and rough location. Just replace the name tag with the maxspeed tag and you are almost done.

Overpass API has a really powerful language which can be quite a bit confusing at first. It might help you running your queries via the overpass turbo frontend which has a nice visualization of the results.



来源:https://stackoverflow.com/questions/34203228/how-to-query-osm-from-the-server

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