External IDs, ref's and other codes used in Estonia

Since External IDs can be very useful I wanted to see how these are used in Estonian OSM.

Wiki has documentation for maaamet:ETAK, maaamet:orig_tunnus, EHAK:code, KKR:code and EE:EHIS:id but what about others? I wanted to find out so I and analyzed EE tags.

In addition to multipurpose tag ref and some global ones like clc:id, uic_ref and gtfs_id I did find some interesting tag keys:

  1. tln_ID - bus stops, looks like it’s from historic import. Is it still relevant? The source still exists in some form but the use of this tag is declining.

  2. number - used for seamarks and this is linked to Märgi number - source.

  3. muuseum_id - source has new webpage and this 13 year old id don’t seem to be relevant. Should it be removed?

  4. sadamaregister:ref - along with: sadamaregister:url, sadamaregister:code and ref:LOCODE This is recent addition by @jemm who has been mapping marinas. Great work, but I’m not sure if all 4 tags are really necessary since some information is shared between them. Not an issue, but just something I noticed.

  5. bridge:ref - global tag. Linked to Silla number in Teeregister.

  6. CityIdx - old relic, quite confident this can be deleted.

This list is not comprehensive. There are other rarely used tags like veeohutuse_stend:ref.

1 Like

I’m probably stating the obvious, but to find poplar keys used in Estonia, you could use Geofabrik’s taginfo instead of writing queries yourself or filtering through global data.

I can chime in along CityIdx. It was tag introduced by early phase of Verbatium’s import in 2008. He added that key to some, but not all buildings imported in western part of Tallinn to presumably make OSM map data compatible with Garmin devices popular in Estonia back then. Instead of just deleting the tag, please make sure all of those buildings have correct addr:city tags, as currently most of them seem to be lacking them. In 2020 i ran import which removed some instances of the tag, but not all, because those buildings’ (geometry) didn’t meet certain requirements I can’t recall any more. (link to relevant code snippet)

Tln_ID tag has gone through mailing list suggesting that’s also leftover from early Verbatium imports. I think it’s safe to remove, afaik nowadays transit data relies on peatus.ee’s GTFSs.


No, you are not :grinning: I have somehow missed it, although it is nicely documented in here.

CityIdx, yep, looks like some of these building are missing addr:city. And since there are only 32 instances it’s very easy to do additional manual checks to see if the building still exists or even add the maaamet:ETAK tag.

tln_ID is also bundled with source = http://soiduplaan.tallinn.ee/cache/stops.txt and copyright = © 2002-2007 Tallinna Transpordiamet. Since the source url is invalid, I assume it can be removed. But what about copyright tag?

For marinas using two overlaping pairs:

  • sadamaregister:ref + sadamaregister:url
  • sadamaregister:code + ref:LOCODE

was initially somewhat intentional and later it was too late to change it. And now all marinas are basically mapped.

Two years ago I also introduced also veeohutuse_stend:name + veeohutuse_stend:ref initially from infoboards, but now from opendata and I tag areas where they apply (beaches, swimming areas and boat piers/quays).

However there are at least 3 more databases where national ref’s can be added:

There is also Hiite Maja SA Looduslike pühapaikade andmebaas ArcGIS Web Application and they seem to include references to all these three as applicable. Their own website also has listings, but I’m not convinced that id’s in their urls are persistent (Pühapaikade andmekogu - Virumaa, Kadrina, Saukse hiiesalu).

Until we figure out what’s the best approach with these three, I’ve added plain url’s to POI’s.

If you like to make any kind of changes to these tags, let me know. I can easily do a bulk update and align them as you wish.

I don’t know much about marinas or how these should be mapped, but one of the simplest solution could be with only two tags:
ref:LOCODE (keep it as it is)
source:website (use it for sadamaregister:url)

For any kind of future tags, should we use common pattern? I would propose to use:

But I’m open to other suggestions :slight_smile:
This is very similar to schema used by French.

Finally, if there are no objections I will remove following tags form EE OSM objects:

and these key value pairs:
source = http://soiduplaan.tallinn.ee/cache/stops.txt
copyright = © 2002-2007 Tallinna Transpordiamet


Thanks for offering, but let’s keep as it is.

1 Like

Tag cleanup complete.
Decided to retain string © 2002-2007 Tallinna Transpordiamet and moved it to source tag.

For codes like KLO4000917 I’ve been using “KKR:code” key that dgmapping mentioned above. Previously these codes were labeled as “keskkonnaregistri kood” and “kkr_kood” is also still used in Keskkonnaportaal URL-s.

As for EELIS ids, are these unique to the entire database or only to object type (yrg, ala, saar etc. – included in URL)? Also, as EELIS objects usually also have kkr_code then maybe EELIS id is sort of redundant.

As for cultural monuments, I suppose we could follow the schema that other countries use as per Key:heritage - OpenStreetMap Wiki. Then maybe the id key could be “ref:kmr” (abbreviated from “kultuurimälestiste register”).