Why not ask your question on the new OpenStreetMap Community Forum?

Hi All,

I'm having a bit of trouble running queries for areas that are within other areas. For example:

  [name="United States of America"]
  [border_type=national] -> .usa;
out 100;

I would expect this to return a list of states in the US. However, what I actually get is a random hodgepodge of areas with admin_level=4, not just those in the US. Am I misunderstanding the area syntax?

asked 07 Mar '14, 04:15

sib's gravatar image

accept rate: 0%

There are two different problems entangled:

Overpass API doesn't support to query for areas in areas. It is just not implemented, but you could get a similar result with the query

  [name="United States of America"]
  [border_type=national] -> .usa;
out 100;

It is unfortunately really slow.

Second, there are a lot of relations (and thus areas) tagged with "admin_level=4" although they are not states. One example is relation 80297 which is a park somewhere in Ohio.

permanent link

answered 07 Mar '14, 10:03

Roland%20Olbricht's gravatar image

Roland Olbricht
accept rate: 35%

Unfortunately, it is not yet possible to search for areas inside other areas. See this ticket on github. :/

permanent link

answered 07 Mar '14, 08:49

tyr_asd's gravatar image

accept rate: 64%

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: 07 Mar '14, 04:15

question was seen: 4,284 times

last updated: 07 Mar '14, 10:03

powered by OSQA