You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>>print [(feature['tags']['name'], feature['id']) for feature in response['elements']]
88
88
[(u'Salt Lake City', 150935219), (u'Salt Lake City', 585370637), (u'Salt Lake City', 1615721573)]
89
89
90
-
If you want to get the data on the OSM XML format, pass the option 'asGeoJSON=False':
90
+
You can specify the format of the response. By default, you will get GeoJSON using the `responseformat` parameter. Alternatives are plain JSON (`json`) and OSM XML (`xml`), as ouput directly by the Overpass API.
91
91
92
92
.. code:: python
93
93
94
94
>>>import overpass
95
95
>>> api = overpass.API()
96
-
>>> response = api.Get('node["name"="Salt Lake City"]', asGeoJSON=False)
96
+
>>> response = api.Get('node["name"="Salt Lake City"]', responseformat="xml")
0 commit comments