Import/Catalogue/Kindergarten import Norway

From OpenStreetMap Wiki
Jump to navigation Jump to search

Import Plan Outline

The Norwegian Directorate for Education and Training (utdanningsdirektoratet) has released a dataset about all kindergartens in Norway, available at Kindergartens which are manually associated with a Key:no-barnehage:nsrid will be kept automatically updated with changes in the data.udir dataset. This automatic update does not overwrite any modified openstreetmap values, a key-value is only modified if the previous opensteetmap data agrees with the previous data.udir value. See below for more details. A (norwegian) website has been setup to track progress and to view and/or download extracted data, please see: barnehagefakta_osm_data


The goals are

  • Provide mappers with a simple view of the NBR data which is relevant to OSM.
  • Keep any added tags up-to-date with changes from NBR.
  • To provide a consistent set of tags for kindergarten data in Norway


This will be an ongoing community conflation/import. As an initial step, kindergartens allready in OSM must be associated with the current NBR tags, after which an automatic script will keep the tags up-to-date. After that, kindergartens missing from OSM should be added, based on local knowledge.

Import Data


Links to sources.

Data source site:
Data license:
Type of license: NLOD, Norwegian Licence for Open Government Data.
Link to permission: Approval from Utdanningsdirektoratet (in Norwegian) -
OSM attribution:
ODbL Compliance verified: yes

OSM Data Files

The prepared OSM data can be found under

.osm files are made available for each municipalities, e.g. where 0101 is the municipalities id.

Import Type

The inital conflation/importing will be done manually. See Manual Workflow below.

An automated scripts has been written to keep kindergartens which are manually associated with a Key:no-barnehage:nsrid automatically updated with changes in the data.udir dataset. This automatic update does not overwrite any modified openstreetmap values, a key-value is only modified if the previous opensteetmap data agrees with the previous data.udir value.

The automated script relies on for the upload to the OSM database. The manual part can be done in JOSM with the provided .osm files, or any other OSM editor by copying from the webpage

Data Preparation

Data Reduction & Simplification

The dataset contains meta-data which are not relevant to OSM and some data which the local community has decided not to include. The original data contains nodes (single lat/lon), but these can be merged to existing closed ways (areas) or relations as appropriate.

Tagging Plans

See Tag:amenity=kindergarten for how to map a kindergarten, as an example of tags from data.udir

Either changesets or each object should contain, preferably combined with survey and/or knowledge, e.g.;survey.

The id can be used in the following urls (using "888839542" as an example)

Not all kindergartens contain all of the keys.

Changeset Tags

Changesets should contain

Data Transformation

The github code can be found here: the main 'transformation' is in

Data Transformation Results

Example .osm file

Data Merge Workflow

Team Approach

This will be a community import. The scripts, automated edits and webpage is maintained by OSM User:Øystein Bjørndal.


Manual Workflow

Based on local knowledge or previous OSM data, add all missing tags from data.udir. There are a couple of starting points for contributing:

Option A: Using the webpage

  1. Find a missing or incorrect kindergarten here:
  2. Using your favorite OSM editor, copy tags from the "Tags fra NBR" column into OSM. This is particularly simple in JOSM, as it allows you to paste all of the key=value pairs directly.

Option B: Using JOSM

  1. Find the barnehagefakta.osm for the municipality you are interested in:
  2. Download and open in JOSM
  3. Copy nodes over to the appropriate node, area or relation.

Option C: POI importer

  1. Open JOSM and ensure "Enable remote control" is enabled by going to "Preferences" -> "Settings for the remote control feature.".
  2. Using the POI_Importer zoom in on the area of interest:
  3. After nodes are no longer grey, click a flag and press either the "Import Data" or "OSM Data" buttons on the popup. Please note the following warnings: The tool looks for amenity=kindergarten in a small radius around the NBR data point, it will therefore miss kindergartens already in OSM:

Option D: Using Python

If you want to conflate a large number of kindergartens, the following python script might be useful: feel free to open an issue if stumble on some bugs.

Automated Workflow

  • For each modification in data.udir
  • Ignore if the no-barnehage:nsrid value has not been added to OSM
  • Auto update if previous OSM data matches exactly previous data.udir
  • Mark as conflicting if the OSM data does not match previous data.udir.


  • The initial data.udir data says that contact:phone=1
  • This is modified in OSM to the (correct) contact:phone=123456789. The automated script will not notice, as the data.udir data has not been modified.
  • data.udir updates the phone number to contact:phone=987654321. The script compares the previous value ('1') with the OSM value ('123456789'), as these do not match, the conflict must be manually handled.


Conflation will be manually handled, with the exception of the trivial case of the OSM data matching the previous data.udir data as described above. Any dump of the data.udir nodes into OSM is highly discurraged.


Feel free to add to the QA!

Do you need the id no-barnehage:nsrid=*?

The id is necessary for keeping the information up-to-date. This is especially important for keeping the contact:* tags updated. (Kindergartens have a tendency to stay stationary and keep their names, but we expect the contact, operator and capacity tags to change over time).

None of the other tags can be realistically used for a one-to-one mapping, as the name in OSM does not need to match the name in the dataset and the name might also be used on other objects (like bus-stops).

The id can also be used to look up the raw API response: or the slightly prettier: