If I want to search for the ways and relations of highways and buildings within a bounding box, is this the most efficient way to write that query?

"[out:xml];(way[highway]({bbox});way[building]({bbox}););(._;>;);out;"

Or is there a more efficient way to specify the bounding box and the ways/relations I want within it? I'm using https://lz4.overpass-api.de/api/interpreter

Thanks for taking the time.

edit

To add some more context, we have an application where a user can toggle buildings, roads, railways...etc. So I need to be able to programatically peice together the query. So we get variations like:

"[out:xml];(way[railway]({bbox});way[building]({bbox}););(._;>;);out;"
"[out:xml];(way[highway]({bbox});way[building]({bbox}););(._;>;);out;"
"[out:xml];(way[building]({bbox}););(._;>;);out;"

asked 08 Jan, 20:35

kida001's gravatar image

kida001
31126
accept rate: 0%

edited 10 Jan, 14:08

TZorn's gravatar image

TZorn
5.0k22598

I think this is already the most efficient and most concise query. However I'm not an Overpass API expert.

(13 Jan, 13:41) scai ♦
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

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:

×124
×44

question asked: 08 Jan, 20:35

question was seen: 179 times

last updated: 13 Jan, 13:41

powered by OSQA