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.
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.
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.