I'm failing to get a union of node/way/relation using the area filter. It's returning only the first types (ie node). How do I return all?

http://overpass-api.de/api/interpreter?data=[out:xml];area[name='London'];(node'fhrs:id';way'fhrs:id';relation'fhrs:id';);out body;>;out skel qt;"

asked 09 Feb '17, 20:19

DaveF's gravatar image

accept rate: 0%

The help site seems to have mangled your url. Maybe the Overpass Turbo wizard does what you want?


That's the result of "fhrs:id"=* in London in the Wizard input box.

Turbo has a special operator to lookup places in Nominatim, but the area syntax works too:


If your url is mostly intact, the main issue is likely that the area filter has to be applied to each query as in the above links.

If you need the data outside Turbo, the "Export" button provides a range of options.

permanent link

answered 09 Feb '17, 23:41

maxerickson's gravatar image

accept rate: 31%

Thanks for the reply. Turbo was my starting point, but I want to automate the download process via a windows batch file.

The Overpass help is quite confusing, but it appears that overpass.api doesn't accept (area.searchArea). It also seems to not like quote marks (") but I haven't worked out why.

When exported as overpassQL your Turbo routine returns the error: 'Invalid IPv6 numeric address.' (As did my attempts).

(10 Feb '17, 00:17) DaveF

The named areas are a feature of Overpass API. The {{geocodeArea:London}} in the first link is an Overpass Turbo feature, but I've swapped it out in the second link (and the "Export" feature on the Turbo website will do that for you anyway). You want to use the "raw data directly from Overpass API" export option to pull the data somewhere else.

I just successfully fetched this url using wget

(10 Feb '17, 00:57) maxerickson

Thanks. Got there in the end with your last example.

Apologies for my first post's copy/paste but this forum won't format it properly. Trying to post this api call;out center;) (<Markdown won't create link or code element! it gets confused by the brackets)

Which I'd extrapolated from This OSM Help Question

As I said I only get the first item (nodes) returned. Is it possible to get it to work, or is your solution the only way?

(10 Feb '17, 14:09) DaveF

Yes, it is necessary to either use the named area or to repeat the area statement for each query. The node(area) query overwrites the input set, so the way(area) query looks for areas in the result of the node query, and of course there are none.

It's possible to explicitly include the area in each query rather than doing it before the query: node(area:3600065606),way(area(3600065606) etc. I find the method using a named set clearer.

The docs have more about it: http://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#By_area_.28area.29

(10 Feb '17, 14:44) maxerickson
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 09 Feb '17, 20:19

question was seen: 1,519 times

last updated: 10 Feb '17, 14:44

powered by OSQA