Import/Plans/Danish Buildings

From OpenStreetMap Wiki
Jump to: navigation, search


This page documents the plan for importing Danish building outlines obtained from Geodatastyrelsen (formerly Kort & Matrikelstyrelsen), the Danish official agency in charge of geodata.

Import checklist

Step Status
Gain familiarity with the basics of OpenStreetMap, including editing, such as adding details of your neighbourhood. Consider following the beginners' guide. OK
Learn about the history of imports and the concerns surrounding them. See: Import/Past Problems OK
Identify data you'd like to import. This might be street centerlines, building outlines, waterways, addresses, etc. OK
Obtain proper permissions and licenses to use the data in OSM from the data owner. If the license of the data is not compatible with the OSM Open Database License, you can not use the data. Many localities already have progressive open data policies. Others have data policies that are almost open, but have conflicts with issues like prohibitions on commercial use or requirements for attribution. Sometimes, getting permission to use data, even if the existing license might seem prohibitive, is as simple as asking the appropriate authority if they are willing to comply with the terms of the OSM Open Database License. See Import/GettingPermission for example emails that touch on important issues. Essentially done. Missing clarification
Register your permissions and project by adding a line to the table at Import/Catalogue. OK
Cite contributions by the data owners, if necessary to cite them, at: Contributors.
Write a plan for your import. Create a wiki page outlining the details of your plan. This plan should include information such as plans for how to convert the data to OSM XML, dividing up the work, how to handle conflation, how to map GIS attributes to OSM tags, how to potentially simplify any data, how you plan to divide up the work, revert plans, changeset size policies, and plans for quality assurance. An example for this can be found at Import/Plan Outline
Discuss your plan. Email the OSM community to notify them of your plans, including a link to your wiki page. You can do this with an email to (at a minimum), talk-(your country), and the OSM group specific to the the area directly impacted by the import. This will help gain the benefit of past experiences, which may include having already reviewed the data you're considering for import. Check for local user groups, local chapters, and country-specific mailing lists.
Be prepared to answer questions from the community. Discuss with the community the suitability of each layer for importing. Some data can be readily imported without much difficulty, while others are far more difficult (e.g. street centerlines). Also some are broadly accepted for import, while others haven't had much consensus (e.g. parcel boundaries).
Follow your plan.
Track your progress.
Provide updates to the community on your efforts.
Let everyone know when you're done.

Import Plan Outline


The goal of the import is to import building outlines, virtually completing the coverage of Danish buildings. As many building outlines exist in OSM already, care must be taken to ensure only the missing buildings are imported.


The import will likely be done in two stages:

1. An automated import of all buildings that don't overlap with existing buildings in OSM 2. Optional manual merging of the remaining data, possible by any OSM user, where the import source is newer or of better quality than existing OSM data.

The first step should be doable by February 2013 if no major problems arise. Estimating the timeframe for the second step is virtually impossible.

Import Data


Provide links to your sources.

Data source site: and specifically
Data license: Needs clarification
Link to permission:
OSM attribution: (will be added)
ODbL Compliance verified: yes (explicit permission)

OSM Data Files

To be done.

Import Type

The import is planned as a one-time import, but later updates may make automatic updating desirable. As each building has an id, there is no reason why this can't be automated in the future.

As outlined above, the data will be imported in two steps.

1. The first step will be done using automated uploading, the specific method has not been investigated yet. 2. The second step will be performed manually using JOSM to merge the wanted buildings into OSM. A guideline for this process should be written.

Data Preparation

Data Reduction & Simplification

The data will be compared to existing buildings outlines, by inspecting whether each building overlaps an existing OSM-object tagged with either building=*, shop=*, amenity=* or man_made=*.

All objects with more than X nodes and more than Y nodes per meter of perimeter will be simplified using PostGIS' implementation of the Ramer-Douglas-Peucker algorithm with a tolerance of Z (the exact values are not yet determined).

The exact steps and parameters can be inspected in the script: (not yet uploaded).

Tagging Plans

Input Output
BYGNSTYPE=Pelsdyr Opdræt building=farm_auxillery
BYGNSTYPE=Drivhus building=greenhouse
BYGNSTYPE=Tank/Silo building=yes + man_made=silo
BYGNSTYPE=Bygning building=yes
FEAT_ID=12345678 gst:feat_id=12345678

Changeset Tags

source=Geodatastyrelsen (2013) or source=Geodatastyrelsen FOTkort10

Data Transformation

Data is in UTM32-EUREF89 projection, and will be imported as such from arcgis shapefiles into a PostGIS database for processing. From there it will be exported to shapefiles again and converted to .osm using pnorman's Ogr2osm.

Data Transformation Results


Data Merge Workflow

The preperation script will divide the data in two parts: Buildings that overlap existing OSM buildings, and non-overlapping buildings. The two parts will be handled differently, so this section is split in two.

Automatic import of non-overlapping buildings

Team Approach

The automatic part of the import will be performed by Jonas Häggqvist.


List all factors that will be evaluated in the import.


Detail the steps you'll take during the actual import.

Information to include:

  • Step by step instructions
  • Changeset size policy
  • Revert plans


Identify your approach to conflation here.

Manual import of overlapping buildings

Team Approach

This step will by necessity be performed by any interested OSM user. It is not necessary that any are merged, as the current data in OSM is generally of good quality, so this part of the import is essentially optional.


List all factors that will be evaluated in the import.


Detail the steps you'll take during the actual import.

Information to include:

  • Step by step instructions
  • Changeset size policy
  • Revert plans


Conflation must be handled manually at this step.


Prior to import, I plan to perform semi-automated checks on node density and nodecount, inspecting suspected outliers. I also plan to request - as the import guidelines suggest (require?) - that other users inspect the data files. Additionally, I intend to first import a couple of batches of buildings to a dev API instance and request that people inspect that - as it is my experience and expectations that people are more likely to be interested if they can see the actual output.