Import/Catalogue/Address import for Norway

From OpenStreetMap Wiki
Jump to navigation Jump to search


We plan to import addresses from Elveg, which is an export from ‘Nasjonal vegdatabank’, the official national road database, and parts of ‘Matrikkelen’, the official national database of properties, buildings and addresses. It contains all addresses in Norway. Elveg is published by the Norwegian Mapping Authority (Kartverket).

The import has been thoroughly discussed on the Norwegian OSM mailing list, and this wiki page is the result of consensus there.

For information about other imports from Kartverket, see No:Kartverket import.

UPDATE December 2018: Addresses are now being imported from the Cadastre Registry of Kartverket. The import program is on Github: addr2osm. The import process described below is no longer used.

Licence and permission to use the data

Elveg is licensed under CC BY 4.0.

Kartverket has confirmed by e-mail that the data can be integrated into OSM. The e-mail is archived on the Norwegian OSM mailing list.

Kartverket has been added to the list of contributors.

Data quality

As the dataset is based on the official address database of Norway, the data quality is excellent. The dataset is used in the public administration, by the Norwegian mail service, and by emergency and rescue services. Still, as for any dataset, there will be errors.

Tagging scheme

Elveg contains two types of addresses: gateadresser (street addresses / postal addresses) and matrikkeladresser (land register addresses without street names and house numbers). Only gateadresser will be imported.

All addresses imported will be separate nodes. Existing addresses in OSM will not be removed unless they are found to be wrong and only by manual inspection of every individual one. This page will provide XML files with the missing address nodes only. This will ensure that no duplicates are imported.

Eventually, the plan is to follow Denmark in moving away from the inconsistent ways of tagging addresses on either buildings, building ways, building nodes or as separate address nodes. All addresses should exist as separate nodes, not connected to any other objects (though typically placed inside building areas where these exist). Each address should exist only as a *single* node (e.g., there won’t be a separate (address) node for every shop in a mall), see this reasoning (in Norwegian). But because of lack of consensus in the local community, this will not happen yet.

We will use the following tags:

Elveg key OSM key Comments
addr:housenumber=* Digit(s). Any letters should be upper case. No space between digit(s) and letter(s); e.g. addr:housenumber=16A.
POSTNR addr:postcode=* Four digits (may have leading zeros, as in 0051).
POSTNAVN addr:city=* Norwegian: poststed

No other tags will be added.

Changeset tags

Changesets shall be tagged with source=Kartverket and source:date=*.

Import process

We will import one municipality at a time. The dataset for a municipality will be imported as a single changeset, if possible, or a few changesets if the size exceeds the maximum changeset size.

Dedicated import accounts

This will be a community import, and various persons will be involved.

The persons importing the data will use separate import accounts, named username_import, where username is their original username. They will be personally responsible for the quality of the import.

Data transformation

Elveg is available from Kartverket as SOSI files. There is one SOSI file for each of the municipalities in Norway, 428 in total.

The original SOSI files from Kartverket have been converted to OSM XML files with sosi2osm and adresser.lua. The OSM XML files can be downloaded from here (23 MB). In addition, xml-files where already existing nodes have been removed and some errors have been corrected, are available for each municipality.

Pre-import cleanup

The person doing the import will also do the following pre-import cleanup (Use this page to check these things: addressnodeimportstatus.php:

  • All nodes/ways with address information already in OSM must be matched with nodes available in the Elveg dataset.
  • If there are non-matching nodes/nodes without street names etc, these must be corrected/investigated before the import.
  • If desired, the person doing the import may manually remove addr:tags on buildings and separate them out to nodes.
  • POIs with addr-tags will not necessarily be removed during the import, but separate address nodes will be imported.

The pre-cleanup will be committed as separate changesets, also using the user’s import account.

Quality assurance

The dataset for each municipality will be manually inspected for any errors (such as names spelled with UPPERCASE LETTERS, or character encoding conversion errors). This is the responsibility of each person importing data. As a minimum, he or she will examine a list of every unique addr:street=* and addr:city=*, and look for errors. He or she will of course also look at the coordinates of the dataset, to ensure that they lie inside the boundaries of the municipality.

There may be some spelling errors in the data that need to be corrected. See No:Map_Features#Spelling_of_street_names for some general guidelines.

Multiple values in addr:housenumber=* are not allowed; use extra nodes instead.

Keeping the information up to date

We plan to keep the address information in OSM up to date by regularly comparing OSM data with data from Elveg (addresses in Elveg are updated quarterly). We will check that:

  • Each address node in OSM has a corresponding (identical) address record in Elveg.
  • Each address record in Elveg has a corresponding (identical) address node in OSM.
  • No addr:* tags exists on any OSM objects other than nodes (ensuring that there is a one-to-one relationship between addresses and OSM objects).
  • The position of the OSM node and the position according to the Elveg record are close (<5 m distance).

We will write scripts to automate this quality control. Any difference between Elveg and OSM will be manually handled. Any mistakes we find in the Elveg data will be reported back to the Norwegian Mapping Authority (Kartverket).

A web page comparing OSM data to the address data from Kartverket has been set up, see the mailing list post about it for more information.