Duplicate boundaries in Poland

Hello,

Apologies for the post in English. I consume admin_level=7 and admin_level=8 boundaries in Poland.

I recently learned that some boundaries at these levels are essentially duplicates, for example:

I would like to get a list of relation IDs for cities and towns in Poland, but I want to filter out the duplicates. Is there a way to do this?

I would try to filter based on name:prefix together with admin_level. I suspect you are interested in admin_level=8 mostly.

Warsaw is a unique case: as a capital city it has its separate law.
But in general issue is that for larger cities boundaries of miasto/gmina/powiat (city/municipality/county) will be the same.

I’d suggest to detect duplicates using the wikidata tag. Seems the most reliable (and least fuzzy) method these days.

admin_level=7 is municipality border, admin_level=8 is locality border. A town will have a border different from the municipality border only if the municipality is of the “urban-rural” type. So I guess for your use case you can simply always go with admin_level=8. You can use the above-mentioned name:prefix to filter out the villages.

I am hoping to cover all parts of Poland like a jigsaw puzzle. If I only use level 8, I’m missing areas. If I only use level 7, I’m missing areas also. So I’m trying to come up with the right combination that minimizes overlaps.

Could you provide an example for a “hole” in admin_level=7 coverage? All of Poland should be “tiled” on each one of the admin_levels 4, 6 or 7, and I believe it has been mapped in OSM for quite a long time now.

I had found this boundary here:

But I realize that the “hole” has both a level 7 and 8 boundary inside of it! So I think I can just use level 7 boundaries for my application and just ignore all of the level 8 boundaries.

It is normal, since the town of Kolno (admin_level=8) has its own municipality (admin_level=7), from which the villages around the town are excluded. The municipalities like you mentioned are called ring municipalities (“gminy obwarzankowe” in Polish).

Yes, you can. There are just municipalities consisting of a single town or city and the villages around the urban localities only have their own municipalities’ authorities in the town or city.

There should be

admin_level= quantity
4 (wojewĂłdztwa) 16
6 (powiaty) 314 regular + 66 cities
can be a “ring” with city inside
7 (gminy) 2477 → only city / only town / town and few villages/few villages
can be a “ring”
8 (miejscowości) city / town / village
3 Likes