After the latest administrative reform in Estonia this standard is Et:Key:addr:* - OpenStreetMap Wiki is quite confusing. After some Maa-Amet imports (2019 and later) there now are two contradictory ways how data is presented.
one way (this causes that an address can exist several times in one municipality)
There are no good solutions, but proposals could be:
for new megamunicipalities start using addr:district (addr:city=Haapsalu and addr:district=Herjava küla)
or find something else from here Key:addr:* - OpenStreetMap Wiki to fit the way how Maa-amet ADS is defined (old “Pärnu maakond, Tõstamaa vald, Tõstamaa alevik, Varbla mnt 10” to new “Pärnu maakond, Pärnu linn, Tõstamaa alevik, Varbla mnt 10”)
keep the old way of addr:city meaning asustusüksus and all other relations can be found from there (this would be the easiest to implement and carry on how Estonian OSM has worked for 15 years) and this is also in correlation with this statement “Municipality (Kohalik omavalitsus) names are not given, this can be taken from level admin info, e.g. Nominatim finds it from it nicely.” from Et:Key:addr:* - OpenStreetMap Wiki but there are two hardcoded exceptions (Tallinn and Kohtla-Järve, where “addr:city means city proper”)
I would suggest to carry on as it has been before megamunicipalities (i.e. proposal 3) and I have followed this practice “addr:city means asustusüksus” (with two hardcoded exceptions (Tallinn and Kohtla-Järve, where “addr:city means city proper”)).
Please note that for example “Kase 4” exists both in asustusüksus “Haapsalu linn” and “Herjava küla”, but both are in the same municipality “vald - Haapsalu linn”. And in real life they are just 3 km apart. So only “addr:city means asustusüksus” is a working solution.
If we should go for “addr:city means vald”, then for exaple we need to rename all addr:city in Saaremaa and Hiiumaa (as both have on municipality covering whole island) and that would be very strange.
I actually wrote about this to @SviMik (main importer at that point in time) and got a response as well. However without his explicit approval I probably can not publish it here.
I don’t really know much about addresses except that there are 7 levels of them in Maa-amet. Without context of knowing how they are usually mapped to OSM tags when there is no confusion I think this topic is hard to understand for most mappers. Is it documented somewhere?
As I noted - this is the spec https://wiki.openstreetmap.org/wiki/Et:Key:addr:* agreed years ago. But that time we did not have the case of Pärnu and Haapsalu, when municipalities Pärnu and Haapsalu cover also a lot of villages, that are far outside the city proper.
I does feel more logical and less confusing to have an exact village as an addr:city instead of Pärnu to me. It’s better to find some other tag for municipality if we need it (not sure we do).
Also, another example where our mapping of addresses from Maa-amet to OSM doesn’t work. https://xgis.maaamet.ee/adsavalik/CU03839167
It’s suggested to map level 6 to addr:housename, but there is no house. Though it’s an edge-case.
It is just an abstraction. It maps correctly to addr:city=Kolgaküla, addr:housename=Kolgaküla spordiplats - it does not have to be house to use addr:housename the same way as it does not have to be city to map to addr:city
This level 6 is just the name of plot (kinnistu, maaüksus) and it may have a house or may have not.
As qqqqqqqqqqqqqqqqqqqq already suggested, I would also not use Pärnu/Haapsalu municipalities in addr:city.
Maybe I am missing something obvious, but would it be better to always use küla/alev/alevik in the addr:city when possible? Sure, there can be multiple villages with the same name but that’s already the case with names like Vanamõisa küla.
As no more comments are added, then can we consider that this is an agreement now to use addr:city in the meaning of asutustüksus (with the exception of Tallinn and Kohtla-Järve, where addr:city means city proper)?
shall we do a mass-edit or many go-with-the-flow small edits
for mass and/or small edits, I suggest to add this or similar comment to changeset as shown hereinafter
Update of addr:city as agreed by community https://community.openstreetmap.org/t/confusing-addressing-in-estonia-after-2015-administrative-reform-eesti-omavalitsuste-haldusreform/96837
This affects those municipalities which joined with neighbours and kept original name having “linn” in it.
I’m going by heart now, but at least these are involved (roll down and click “x linna asulad” and you’ll see what localities were absorbed under municipality, but are still separate “asustusüksus”):
So in this context only addresses which are in city proper, (ie asutusüksus Tartu, Paide, Haapsalu, Pärnu, Narva-Jõesuu) should have addr:city respectively Tartu, Paide, Haapsalu, Pärnu, Narva-Jõesuu.
A good example at crossroads with nearby buildings:
X-GIS 2.0 [G9n0EPxb] - located asustusüksus Haapsalu linn and addr:city should be Haapsalu
X-GIS 2.0 [jOkVzVxW] - located asustusüksus Uuemõisa alevik and addr:city should be Uuemõisa alevik
X-GIS 2.0 [YI2IOukQ] - located asustusüksus Uuemõisa küla and addr:city should be Uuemõisa küla
As all three are in Haapsalu municipality, then after 2017 import addr:city is Haapsalu for all three.
The following are not affected:
Examples of municipalities which also joined neighbours but have logical names, where this problem does not occur (the same section is “x valla asulad”):
Here’s an Overpass query for Haapsalu, with incorrect addr:city:
Over 4000 addresses, that are affected.
The scope of this kind of mass edit would be quite significant and currently I don’t feel comfortable to perform it myself.
Played with Overpass api and turns out with nested loops it’s possible to extract affected addresses with correct values from underlying OSM administrative boundaries:
Summary:
Number of addresses with correct küla/alev/alevik in addr:city for these 5 city municipalities: 1920
Number of addresses where addr:city is set to city municipality: 24 528
Number of addresses where addr:city does not align with admin boundary/city municipality name: 243
With this overpass query, performing a mass edit is trivial task, but as I already said, this change is quite significant and I’m not sure if using OSM admin boundaries is even the best idea. Importing addresses form Maa-amet might result better data quality.
I compared OSM administrative boundary data from Ovepass with ADS and found out that OSM data quality was excellent. Therefore I decided to fix this issue myself by aligning the addr:city for these 5 municipalities.
In addition I looked at addr:city values in taginfo. There are some typos, historical villages and some other minor issues. Maybe someone is interested in reviewing and fixing it?
List of invalid addr:city values
Loo 167
Aegviidu 107
Mäekülä küla 104
Raasiku 101
Manniva 93
Missokülä küla 90
Alakülä küla 89
Uusküla küla 66
Assaku 59
Liivamäe 50
Saha 49
Jägala 49
Vikipalu 43
Merekülä küla 42
Iru 41
Kulli 36
Aaviku 35
Ülgase 33
Punakülä küla 31
Kandiküla küla 30
Kallavere 29
Torgu vald 28
Külitse küla 27
Igavere 21
Kostivere 21
Saduküla küla 18
Põlva vald 17
Laiaküla küla 16
Kudruküla küla 16
Rebala 16
Lehtse 16
Koogi 16
Soodoma küla 15
Tudulinna alevik 15
Aruvalla 15
Järveküla küla 14
Laheküla küla 13
Parila 13
Adra 13
Kuusemäe 12
Saviranna 12
Veriora vald 11
Sääse alevik 11
Haljava 11
Kaunissaare 9
Harku 9
Madise 9
Perila 9
Järvekülä küla 8
Pikva 8
Mäetaguse 8
Muraste külas 7
Pildiküla küla 7
Kurgla 7
Kristiine linnaosa 6
Rakvere linn 6
Räni küla, Ülenurme 6
Koikküla küla 6
Kalesi 6
Alliklepa 6
Tõrvandi 6
Ruhnu vald 5
Kohtla-Järve linn 5
Vaeküla küla 5
Ihasalu 5
Rohuküla küla 4
Ruu 4
Lemmatsi 4
Toila 4
Räpina vald 3
Albu vald 3
Harku vald 3
Viimsi 3
Hummuli 3
Viiratsi 3
Viljandimaa 3
Peningi 3
Tabasalu 3
Vastse-Kuuste 3
Uue-Antsla 3
Vijandi 3
Saue vald 2
Kastre vald 2
Põlva linn 2
Uniküla küla 2
Tammejärve küla 2
Päraküla küla 2
Kose 2
Koonga 2
Kasepää 2
Võeva 2
Palivere 2
Vijandimaa 2
Nasva 2
Õvanurme 2
Горланово 2
Kureküla 2
Alavere 2
Parksepa 2
Jõhvi vald 1
Kõlleste vald 1
Lääne-Nigula vald 1
Rõuge vald 1
Puka vald 1
Viimsi vald 1
Valgjärve vald 1
Tahkuranna vald 1
Tartu vald 1
Keila vald 1
Iisaku vald 1
Rae vald 1
Pajusi mnt 1
Ahtme linnaosa 1
Sillamäe linn 1
Paide linn 1
Haapsalu linn 1
Keila linn 1
Järve küla, Kohtla vald 1
Mõisaküla küla 1
Kaliküla küla 1
Veneküla küla 1
Siniküla küla 1
Altküla küla 1
Lõuna küla 1
Salaküla küla 1
Pärsikivi küla 1
Metsküla küla 1
Rabaküla küla 1
Saaremaa Kailuka küla 1
Narva Jõesuu 1
Narva Joesuu 1
Viljandi Huvikool - tehnikamaja 1
Loo alevik;Loo 1
Meremõisa 1
Viti 1
Piiri 1
Jägala-Joa 1
Soontaga 1
Kohtla-Jarve 1
Kopu 1
Hulloküla 1
Sauga 1
Kaerepere 1
Süaoru 1
Virtsu 1
Läänemaa 1
Haljala 1
Kohatu 1
Märjamaa 1
Kiidjärve 1
Väimela 1
Saverna 1
Kudjape 1
Aarna 1
Rannapungerja 1
Tartumaa 1
Vatla 1
Suuremõisa 1
Järsi 1
Jõhv 1
kohila 1
Kõrgessaare 1
Mustla 1
Ahja 1
Lehetu 1
Jüri 1
Vetla 1
Käsmu 1
Tigete 1
Liiva 1
Vinni 1
Lossimäe 1
Taebla 1
Tallin 1
p 1
Karula 1
Luua 1
Peetri 1
Sillamae 1
Põlvamaa 1
Salumetsa 1
Männiku 1
Kuremäe 1
Kuusalu 1
Ikla 1
Laitse 1
Main 1
Linnamäe 1
Järva-Jaani 1
Varbola 1
Salme 1