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)
Way History: 227116937 | OpenStreetMap Haapsalu (omavalitsus) and not Herjava küla (asustusüksus)
Way History: 212577429 | OpenStreetMap Pärnu (omavalitsus) and not Tõstamaa alevik (asustusüksus)
Way History: 213320412 | OpenStreetMap Tartu (omavalitsus) and not should be Haage küla (asustusüksus)
Way History: 226686494 | OpenStreetMap Lihula (asustusüksus) and not Lääneranna vald (omavalitsus)
Way History: 213731770 | OpenStreetMap Sauga alevik (asustusüksus) and not Tori vald (omavalitsus)
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.
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.
This example is the same, just it has a house:
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)?
If so, then there are some practical questions:
- we probably need to change https://wiki.openstreetmap.org/wiki/Et:Key:addr:*
- 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
Is there a easy way to find all addresses where municipalities are stored in addr:city? I would like to understand the scope of this issue.
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:
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”):
And of course there were cities which did not join anyone and also this problem does not occur:
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:
Slow query, make sure you actually need the data.
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
Mäekülä küla 104
Missokülä küla 90
Alakülä küla 89
Uusküla küla 66
Merekülä küla 42
Punakülä küla 31
Kandiküla küla 30
Torgu vald 28
Külitse küla 27
Saduküla küla 18
Põlva vald 17
Laiaküla küla 16
Kudruküla küla 16
Soodoma küla 15
Tudulinna alevik 15
Järveküla küla 14
Laheküla küla 13
Veriora vald 11
Sääse alevik 11
Järvekülä küla 8
Muraste külas 7
Pildiküla küla 7
Kristiine linnaosa 6
Rakvere linn 6
Räni küla, Ülenurme 6
Koikküla küla 6
Ruhnu vald 5
Kohtla-Järve linn 5
Vaeküla küla 5
Rohuküla küla 4
Räpina vald 3
Albu vald 3
Harku vald 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
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