We were previously using http://overpass-api.de/api/map?bbox={bounding box cords} to retrieve data within the provided bounding box coords. To increase our limits and speed we have launched our own instance of the overpass API.

This API uses the interpreter and we are making the query like /api/interpreter?data=[out:xml];node({bbox coords});out;

This produces different results and we do not get street data like tag k="highway" v="secondary" or tag k="type" v="multipolygon" for buildings.

What is the different between /api/map vs /api/interpreter and is it possible to get similar data with the interpreter? What would be the equivalent api/map?bbox={bounding box cords} query for the interpreter?

asked 19 Dec '19, 18:55

kida001's gravatar image

accept rate: 0%

edited 20 Dec '19, 10:08

scai's gravatar image

scai ♦

The reason you aren't receiving elements with tags highway=secondary or multipolygon elements is that you are only querying for nodes. To retrieve roads and buildings you need to search for ways, to retrieve multipolygon buildings you need to search for relations, too.

To search for nodes, ways and relations (nrw) use the following query:

permanent link

answered 20 Dec '19, 10:15

scai's gravatar image

scai ♦
accept rate: 23%

edited 20 Dec '19, 10:15

Thank you, before your answer I was using [out:xml];(way[highway]({{bbox}});way[building](#{{bbox}}););(._;>;);out;

Is either one of the two more efficient? At times if I just want to search for buildings is it best to use the query I have above sans highway?

(20 Dec '19, 18:00) kida001

I'm not really familiar with Overpass API internals. However personally I would always stick to the more stricter rules as long as it returns all necessary data.

(21 Dec '19, 18:47) scai ♦
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: 19 Dec '19, 18:55

question was seen: 297 times

last updated: 21 Dec '19, 18:47

powered by OSQA