Standardise - switch from “ref:raa” to “ref:SE:raa”

Key:ref:raa - OpenStreetMap Wiki has no “:SE:” between “ref” an “raa” so doesn’t show up at the below listed places.

Proposed fix: switch from “ref:raa” to “ref:SE:raa”

  1. Wiki category using “from=ref:SE:” Category:Key descriptions for group "references" - OpenStreetMap Wiki
  2. Search for “ref:SE:” (Search results | OpenStreetMap Taginfo) returns:

Data from: 2025-10-06 00:59 UTC

2591 ref:SE:scb
1735 ref:SE:pts:postort
450 ref:SE:skolverket
51 ref:SE:rikshållplats
29 ref:SE:fastighetsbeteckning
7 ref:SE:skola:skolenhetskod
7 ref:SE:skola:verkform
6 ref:SE:scb:cfar
6 ref:SE:kommun
4 ref:SE:lan
2 ref:SE:län
1 was:ref:SE:skolverket
0 ref:se:pts:postort
0 ref:se:scb

fyi: @pangoSE @HuggeK @EAman @Lumikeiju - you reacted at Standardise - switch from "ref:se:" to "ref:SE:" and might be specifically interested in that closely related proposal.

I didn’t find any other Sweden-specific reference key in the OSM wiki or in taginfo.

1 Like
2 Likes

I support standardizing them all

1 Like

I think it should be simple, logical, and easy to maintain, especially when the reference can be verified directly from a public URL.

with Key:ref:hjartstartarregistret.se / Sv:Key:ref:hjartstartarregistret.se

you have

> URL: https://www.hjartstartarregistret.se/#/87358
> gives ref:hjartstartarregistret.se = 87358

This direct link between the tag and the official registry makes it easy to verify (just paste the number into the site) and easy to maintain (no extra naming layers).
Adding something like ref:sv:hjartstartarregistret.se only adds complexity

  • .se --> indicates sv

Keep it simple — KISS!

That’s an argument for adding the ref to tag2link, no need to paste anything as you can open it directly from OSM.org

Quoting myself in another topic:

2 Likes

Not true at all.

As of today it contains:

  1. Key:ref:grillplatser.nu
  2. Key:ref:hjartstartarregistret.se
  3. Key:ref:NVRID
  4. Key:ref:raa
  5. Key:ref:SE:scb
  6. Key:sl stop id

The first two are domain names, which are already “guarantueed” to be globally unique, and probably need another kind of discussion. All the other current “ref:SE:” and “ref:[DE|FR|US|…]:” do not contain domain names.

For “ref:sl_stop_id” it says: “The value of sl_stop_id is an internal ID used by SL Stockholm Public Transport” - in case it is restricted to Stockholm län, in ISO 3166 that would be SE-AB cf: ISO 3166-2:SE - Wikipedia . (For DE and US some keys use subtags like “:DE-BE:” and “:US-TX:”)

That leaves only “ref:NVRID” for which it says: “identifier for an area protected under the Environmental Code of Sweden” - i.e. it is: for all of Sweden and not maintained by a private company - seems like a perfect fit for “ref:SE:” instead of “ref:”.

Is it really the best approach to hardcode the country code (e.g. “SV”) directly in the name of the external identifier?

Wouldn’t it be more flexible to represent the region through structured data instead — similar to how OpenStreetMap handles it with Property :P48 – “limited to region”?

* see usage P48

What is “best”?

But especially for SV, as for any Spanish-dominant country it would probably help to avoid misuse of Keys or having Keys used for different ID systems.

Yes, it would be more flexible, but why would one want flexibility when it comes to UIDs maintained by the government of Sweden?

Re P48: that is a qualifier - so I thought it would be P29 “must only be used in region”, and mentioned it in a proposal for Template:KeyDescription to specify the ISO 3166 region: Template talk:Description: Difference between revisions - OpenStreetMap Wiki , ref:SE:scb (Q628): Difference between revisions - OpenStreetMap Wiki

  1. P29 must only be used in region : This key or tag is to be used only in the given region(s). This property cannot be used at the same time as P30.
  2. P48 limited to region : This qualifier indicates that a value is only applicable to a certain region. The region is an item with instance-of = region.

Yes, flexibility may seem unnecessary for something as fundamental as government-maintained UIDs — but the issue isn’t really about flexibility for its own sake.

When we start embedding different kinds of metadata into the name string itself, we move away from the KISS principle. It introduces hidden complexity and makes it harder to evolve or reuse the data cleanly.

Adding a proper reference, or reusing an existing URL pattern with minimal modification, is both simpler and more robust. The goal should be to keep identifiers stable and neutral, while the meaning and context can be described through linked metadata.

To me, having static, language-bound “name strings” is a form of technical debt. We already have better solutions — for example, Wikidata’s multilingual model. Property P18 (image) shows how one statement can yield labels in 200+ languages (example SPARQL query).

If we want data to be usable globally, we should explain things in the reader’s preferred language, not hardcode names in one. OSM’s wiki pages are a good step in that direction — but ideally, even key names themselves should be less static and more semantically linked….. but that I guess is another issue….

NVRID = wd:P3613 → SPARQL

What you present is a different topic. The current situation is that users face the key name in different places.

“ref:SE:” is not a language, any capable tool can do things on top. One can store things three or more times as is done now (Wiki template, Wiki category, Wikibase data items(plural!)) - but the simplest currently available is, to store it only once, namely in the key name:

  1. “ref” means reference (can be displayed in any language, eg. deu:Referenz)
  2. “SE” means Sweden (can be displayed in any language, e.g. deu:Schweden)

Replacing “ref:raa=” with “P1234” would be a different topic: FAQ - OpenStreetMap Community Forum “Don’t divert a topic by changing it midstream.”

My point is that if we want to address technical debt, we shouldn’t add more complexity — we should aim to make things better and simpler KISS

In Wikidata, for example, the user interface is language-sensitive example P3613 = NVRID:

That’s a good example of how multilingual data can be handled properly:

  • :white_check_mark: Add metadata as structured data
  • :white_check_mark: Focus on user-friendly, KISS-style solutions (Keep It Simple, Stupid)
  • :white_check_mark: Move away from a “one alphabet fits all” mindset
  • :white_check_mark: Embrace multilingualism and internationalization (i18n) to make the system truly global
  • :white_check_mark: Design solutions with better granularity than country
  • :white_check_mark: Strengthen the use of “same as” links to external references — in a digitally mature ecosystem, platforms like OSM will increasingly rely on these connections to stay synchronized and up to date
    :white_check_mark: Since we already have an “instance” of Wikidata (OSM Item:Q23184) that supports storing objects and keys in a language-independent way — why not use it? Perhaps we could even explore federation with Wikidata, where entities like a region are directly linked to their Wikidata items - see federated queries / Wikibase federation

Simpler than replacing “ref:raa=” with P1234 (and waiting for new software) is to just add the ISO 3166 code “SE”, which can be handled by existing software.

Please create a new topic for your proposal. If there is support for replacing the current Key name system with Pxxxx that can be taken as a reason not to go forward with ‘Standardise - switch from “ref:raa” to “ref:SE:raa”’

1 Like

@ilias could you convert “ref:raa=” to “ref:SE:raa”? overpass turbo 2dll

With 199 elements using it, it would follow directly after existing:
2591 ref:SE:scb
1735 ref:SE:pts:postort
450 ref:SE:skolverket

1 Like

Done. Good initiative standardizing the refs in Sweden.

1 Like

Thank you. Wiki adjusted:

  1. Key:ref:SE:raa - OpenStreetMap Wiki
  2. Sv:Key:ref:SE:raa - OpenStreetMap Wiki
  3. ref:SE:raa - OpenStreetMap Wiki - P16 not possible

ref:SE:raa now visible at Category:Key descriptions for group "references" - OpenStreetMap Wiki pagefrom=ref:SE

1 Like

Standardise - change “ref:NVRID/nvrid/DIARIENR” to “ref:SE:”

  1. ref:NVRID | Keys | OpenStreetMap Taginfo - 1872 - overpass turbo 2dmn NEW: ref:SE:nvrid
  2. ref:nvrid | Keys | OpenStreetMap Taginfo - 22 - overpass turbo 2dmm NEW: ref:SE:nvrid
  3. ref:DIARIENR | Keys | OpenStreetMap Taginfo - 1541 - overpass turbo 2dmo NEW: ref:SE:diarienr

NVRID and DIARENR are uppercase, the latter has no wiki page, for the former the page Key:ref:NVRID - OpenStreetMap Wiki - was created 2025-09-30, the sv-version 2025-09-29, four days after Standardise - switch from "ref:se:" to "ref:SE:" was started.

The standard seems to be to use lower case for “ref:SE:*=”.

@pangoSE already supported “standardizing them all” - probably including the three above.

@ilias can these be done, or is more discussion needed?

I see no problem with continuing standardization, but let’s make a poll nevertheless.

Support standardizing ref:NVRID/nvrid/DIARIENR to ref:SE:NVRID/nvrid/DIARIENR

  • Agree
  • Disagree
0 voters
1 Like

Support standardizing ref:NVRID/nvrid/DIARIENR to ref:SE:NVRID/nvrid/DIARIENR

Should be

Support standardizing ref:NVRID/nvrid/DIARIENR to ref:SE:nvrid/diarenr

Compare search for “ref:SE” in taginfo, Data from: 2025-10-10 00:59 UTC : https://taginfo.openstreetmap.org/search?q=ref%3ASE%3A
2591 ref:SE:scb
1735 ref:SE:pts:postort
450 ref:SE:skolverket
199 ref:SE:raa
51 ref:SE:rikshållplats
29 ref:SE:fastighetsbeteckning
7 ref:SE:skola:skolenhetskod
7 ref:SE:skola:verkform
6 ref:SE:scb:cfar
6 ref:SE:kommun
4 ref:SE:lan
2 ref:SE:län
1 was:ref:SE:skolverket
1 ref:SE:raa:lamningsnummer
0 ref:se:pts:postort
0 ref:se:scb

@ilias @loffa @pangoSE

  • Yes
  • No
0 voters

@ilias I think the conversion could be done now.

Standardise - change “ref:NVRID/nvrid/DIARIENR” to “ref:SE:”

  1. ref:NVRID | Keys | OpenStreetMap Taginfo - 1871 - overpass turbo 2dmn — NEW: ref:SE:nvrid
  2. ref:nvrid | Keys | OpenStreetMap Taginfo - 22 - overpass turbo 2dmm ---- NEW: ref:SE:nvrid
  3. ref:DIARIENR | Keys | OpenStreetMap Taginfo - 1541 - overpass turbo 2dmo ---- NEW: ref:SE:diarienr

In favor:

  1. Hidoo00 - in the second poll
  2. ilias - in the second poll
  3. Tobias_Conradi - in the second poll
  4. pangoSE - in discussion: “I support standardizing them all”
  5. loffa - in the first poll only
  6. HuggeK - in the first poll only

Against:

  1. salgo60 - in the first poll (and in discussion)