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

How to create administrative areas alone?

1

I have seen the areas.osm3s file, but i need to know how to create areas only for administrative boundaries i.e only for countries, state etc.. other areas are not necessary for me.

asked 29 Jan '16, 10:02

Arun%20Gowtham's gravatar image

Arun Gowtham
0111114
accept rate: 0%

edited 31 Jan '16, 20:17

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554

1

Could you please provide more details about what you are planning to do with the data? That way, we may be able to provide you with a solution which is more compatible with your needs.

(01 Feb '16, 12:03) Lightsider

@Lightsider overpass api creates a lot of area i suppose, but am in need of only country or state i.e administrative areas. i query for amenities on this areas.

(01 Feb '16, 12:22) Arun Gowtham

Hello Arun, are you looking for a webservice with output like https://wambachers-osm.website/boundaries/ ?

(01 Feb '16, 20:27) stephan75

One Answer:

2

Well, just remove those queries in the area rules file, which you don't need.

For a much stripped down version, you might want to take a look at the following wiki page: https://wiki.openstreetmap.org/wiki/Overpass_API/Areas - that's the original version before Martin started working on polygon features. That wiki page also explains in more detail, how this all works.

If that's still too much, you might also want to remove some further queries:

  <query type="relation">
    <has-kv k="type" v="multipolygon"/>
    <has-kv k="name"/>
  </query>
  <query type="relation">
    <has-kv k="postal_code"/>
  </query>
  <query type="relation">
    <has-kv k="addr:postcode"/>
  </query>

answered 24 Feb '16, 20:06

mmd's gravatar image

mmd
5.7k15388
accept rate: 37%

edited 24 Feb '16, 20:07

Source code available on GitHub .