This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Get data using Overpass API

0

Hello,

I use the Overpass API to get osm data. I use this query from this link:

http://overpass-turbo.eu/s/cQQ

Whe I ran it, it generated only nodes and ways and not relations. How can I please modify this query in order to download an osm file which containes nodes, ways and relations?

asked 30 Nov '15, 13:53

MyriamBah's gravatar image

MyriamBah
11224
accept rate: 0%

1

cross-posted on the French mailing list: https://lists.openstreetmap.org/pipermail/talk-fr/2015-November/078876.html . There I explained that when there are no relations with tags fulfilling the conditions specified in the Overpass query, no relations will be returned.

(30 Nov '15, 14:18) escada

Why are relations needed in your specific example? Your current question reads like "I need the number of legs of humans, dogs and snakes". But snakes usually don't have any legs. Likewise, amenity=bicycle_rental is usually not mapped as relation.

(30 Nov '15, 15:36) scai ♦

There are 27 mapped as relations according to https://taginfo.openstreetmap.org/tags/amenity=bicycle_rental . That may be a mistagging, but they do exist.

(30 Nov '15, 15:44) SomeoneElse ♦

Source code available on GitHub .