overpass-api

overpass-api ways query include coordinates

青春壹個敷衍的年華 提交于 2019-12-10 10:56:08
问题 I'm trying to query Hotels in a specific area. Unfortunately I need to query nodes and ways, because some Hotels are only stored as way and some as nodes. http://overpass.osm.rambler.ru/cgi/interpreter?data=%28way[tourism~hotel]%28around:5000,50.10707,8.76040%29%29;out; The result of a way-query doesn't contain any coordinates, only lots of node-refs: <nd ref="1438833423"/> Is there a way also to include the coordinates of the nodes in the output or do have to start lots of additional queries

'Expected String or Unicode' when reading JSON with Pandas

倾然丶 夕夏残阳落幕 提交于 2019-12-07 03:32:22
问题 I try to read an Openstreetmaps API output JSON string, which is valid. I am using following code: import pandas as pd import requests # Links unten minLat = 50.9549 minLon = 13.55232 # Rechts oben maxLat = 51.1390 maxLon = 13.89873 osmrequest = {'data': '[out:json][timeout:25];(node["highway"="bus_stop"](%s,%s,%s,%s););out body;>;out skel qt;' % (minLat, minLon, maxLat, maxLon)} osmurl = 'http://overpass-api.de/api/interpreter' osm = requests.get(osmurl, params=osmrequest) osmdata = osm.json

'Expected String or Unicode' when reading JSON with Pandas

筅森魡賤 提交于 2019-12-05 08:12:10
I try to read an Openstreetmaps API output JSON string, which is valid. I am using following code: import pandas as pd import requests # Links unten minLat = 50.9549 minLon = 13.55232 # Rechts oben maxLat = 51.1390 maxLon = 13.89873 osmrequest = {'data': '[out:json][timeout:25];(node["highway"="bus_stop"](%s,%s,%s,%s););out body;>;out skel qt;' % (minLat, minLon, maxLat, maxLon)} osmurl = 'http://overpass-api.de/api/interpreter' osm = requests.get(osmurl, params=osmrequest) osmdata = osm.json() osmdataframe = pd.read_json(osmdata) which throws following error: ---------------------------------

OverPass API - SpeedLimit around a co-ordinates

ぐ巨炮叔叔 提交于 2019-12-04 04:01:03
问题 We are developing an application, that needs to find the speed around a specific location... We were planning to use OverPass API to first the speed and tried to follow the article mentioned below. Overpass api to find the speed limit for a co-ordinate? The syntax of the around method is shown below. http://www.overpass-api.de/api/xapi?*[maxspeed=*][around=2500,8.5580957,76.880541] But we are not getting any results... Can anyone guide us if the syntax is correct? 回答1: The failure reason:

Enabling CORS (Cross Origin Request) in Django

China☆狼群 提交于 2019-12-03 08:19:27
I'm trying to make use of the overpass API http://wiki.openstreetmap.org/wiki/Overpass_API with a JavaScript XMLHttpRequest in a project running on Django but I keep getting the Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://www.google.com/accounts/ClientLogin. (Reason: CORS header 'Access-Control-Allow-Origin' missing). error. I get this error whether I'm using GET or POST, and from any other host, not just the overpass API. I've installed django-cors-headers https://github.com/ottoyiu/django-cors-headers and followed the instructions

How to get all roads around a given location in OpenStreetMap?

旧巷老猫 提交于 2019-11-29 11:22:34
Cant figure out how to get all roads for the specific radius at the given location. My current query is <query type="way"> <around lat="55.693309807744484" lon="21.151986122131348" radius="50"/> </query> <union> <item/> <recurse type="down"/> </union> <print/> I tried to add something like this <highway>primary,secondary,tertiary,residential</highway> but it didn't worked See your query on overpass turbo . It does return all ways around the given point. So you seem to have a problem in your parser. If you want to filter for specific highway types then you have to specify a tag as described in