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, 10:52

siemaeniownik's gravatar image

siemaeniownik
263
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, 12:13

Discostu36's gravatar image

Discostu36
176128
accept rate: 0%

Your answer
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:

×178
×139
×22

question asked: 18 Jun, 10:52

question was seen: 156 times

last updated: 24 Jun, 12:13

powered by OSQA