Import/Catalogue/Sweden Address Import

From OpenStreetMap Wiki
Jump to navigation Jump to search

UNDER DEVELOPMENT

Addresses became available as open data in Sweden in February 2025 when Lantmäteriet, the Swedish Mapping Authority, made it available under the EU Open Data Directive as High-Value Datasets. The dataset contains geometry points with addresses from the Lantmäteriet cadastral database. There are 3.7 million addresses in the dataset. This page describes the plan to import them into OSM and to keep them updated.

As of March 2025, there are 830k addresses in OSM for Sweden, but a large number of them are incomplete, lacking for example postal codes, and there are many errors.

Goals

The goals of this import are to:

  • Import missing addresses in Sweden into OSM.
  • Update the existing OSM addresses in Sweden with correct information.

Schedule

  • 2025-03-15 - Import plan discussed in the Swedish OSM community.
  • 2025-0x-xx - Import plan submitted to the OSM community for review.
  • 2025-0x-xx - Start of import for Sweden into OSM.

Import data

Source information

  • Data source site: Address points from Lantmäteriet (link to product page)
  • Data license: CC-BY 4.0.
  • Link to permission (if required): Explicit permission obtained by each individual user by application to Lantmäteriet.
  • OSM attribution (if required): Lantmäteriet link.
  • ODbL Compliance verified: General permission from Lantmäteriet to OSM is pending.

OSM data files

Examples of OSM files with OSM tagging, as well as edits which will be made to OSM, are available in the "Adresser Sverige" folder.

Data quality

The dataset is maintained in the official Swedish Cadastre, which is also the source for the Swedish Postal service. Data quality is high in general and data is updated daily.

As usual, there are a few issues to consider:

  • New plots and buildings may have delayed updates.
  • The position of the address point is in general at the main entrance of the building, however single dwelling properties may have the address point at the entrance of the property (at the driveway to the building).
  • Some addresses also have a house name ("populärnamn"), however several such names seem to be outdated. These names will not be used in the import.

Import type

OSM will be updated by a script, addr2osm. See description below.

Data preparation

Data reduction and simplification

The source data is transformed by a python program, see addr2osm. The following modifications are made to the dataset:

  • Incomplete data is excluded, for example missing post code or city.
  • The various components of a Swedish address are concatenated to OSM addr tagging. There are four address categories which are expalined here (pdf).

Tagging plans

The following tags are used:

Source key OSM key Comments
Street name addr:street=* Used if the address is associated with a street for the categories "Gatuadressplats" (street plot) and "Metertalsadressplats" (street metering). Each address always contains one of either addr:street=* or addr:place=*.
Place name addr:place=* Used if the address is associated with a place name for the categories "Byadressplats" (place) and "Gårdsadressplats" (farm). For the latter, the farm name is concatenated to the place name.
House number + letter addr:housenumber=* Digit(s) + optional letter in upper case. No space between digit(s) and letter(s); e.g. addr:housenumber=16A. In a few cases, extra letters and number may denote a specific entrance point ("en uppgång i en entré") using the codes UH (right), UV (left) and U. For the category "Metertalsadressplats" it will also contain the metering value of the relevant driveway at the address, for example addr:housenumber=250-10.
Municipality district addr:district=* All addresses have been assigned a municipality subdivision name ("kommundel"), for example a suburb of a city. This is an official part of the address and makes the address unique within the municipality. This name is often not used for postal mail.
Postal code addr:postcode=* Five digits. No space.
Postal city addr:city=* Usually the name of the municipality.

No other tags will be added. addr:country=* is not used.

The addr:door=*, addr:flats=*, addr:floor=* and addr:housename=* tags in OSM are not touched by the import if they are already associated with a feature.

Changeset Tags

When uploading to OSM, the changesets will be tagged with:

description=Lantmäteriet address import for <municipality>
source=Lantmäteriet

Data transformation

All addresses imported will be separate nodes instead of tagging buildings or other objects because:

  • The address nodes are located at the main entrance of the building or at the driveway entry, which provides better routing for navigation. Otherwise, larger buildings or properties would get arbitrary routing, often to the back side of the building or property.
  • There is no 1:1 relationship between buildings and addresses. One address node could represent several buildings, and one building could contain several address node.
  • Testing showed that it was not possible to select buildings in a consistently correct way even for single dwelling buildings.

Another choice is to always adjust the address node to the coordinate of the dataset. The reason is that if a user relocates the address node by mistake, it is in general not possible to distinguish between such mistakes and "good" edits. User sometimes moves the address node to the center of a building for better rendering without considering routing implications.

It is still possible to override this scheme and include address tags on buildings, shops, amenities etc. - just add a note=* containing the word "addr". These address tags will be left alone and will not be updated by the import. Note that the address in OSM then will not be updated even if the street gets a new name or the postal code is changed.

Data merge workflow

Workflow

A python import script has been created to facilitate the import updates: addr2osm (on Github). The import is fully automated. The program may be run at any time with no particular preconditions. The script may be run without automatic uploading so that manual inspection/editing is possible before uploading to OSM. Test files have been inspected by the community.

The first run will be done per municipality over several days to ensure sufficient quality. Later, updates will be done per county at regular intervals, usually once per month.

Dedicated import accounts

The dedicated import account addr2osm will be used.

See also