NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hey guys!

I ask for a hint how to build a query that will provide me a poly of each city in voivodeship.

Thanks!

asked 18 Jun '21, 10:52

siemaeniownik's gravatar image

siemaeniownik
26223
accept rate: 0%


Here is an example for municipalities in "Lower Silesian" in Poland:

[out:json][timeout:120];
{{geocodeArea:Lower Silesian}}->.searchArea;
(
  relation["admin_level"="7"](area.searchArea);
);
// print results
out body;
>;
out skel qt;

If the voivodeship has its municipalities or cities as ways instead of relations, just change "relation" to "way" in the code above.

If you really only want cities instead of municipalities, change the admin level from 7 to 8 (might time out). If you want this query for another country (you didn't specify), take a look at this table to see which admin level you need:

Tag:boundary=administrative

permanent link

answered 24 Jun '21, 12:13

Discostu36's gravatar image

Discostu36
2361211
accept rate: 0%

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:

×228
×147
×26
×24

question asked: 18 Jun '21, 10:52

question was seen: 1,244 times

last updated: 24 Jun '21, 12:13

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum