Import/Sachsen-Anhalt Naturschutzgebiete

From OpenStreetMap Wiki
Jump to: navigation, search


Import the Saxony-Anhalt Nature Protection Areas (de:Naturschutzgebiete), as this information is hard to obtain in the field.

The currently mapped Naturschutzgebiete are Import/Sachsen-Anhalt_Naturschutzgebiete/bestehende_NSG


Official discussion period will start when I

  • posted to imports@ list
  • posted to talk-de@ list
  • posted to german OSM forum

and will last two weeks minimum.

After discussion, the workflow will be adapted, the actual import will be done manually using JOSM, so approx. a month will be needed.

Start of discussion period: (not started)

Import Data

The nature protected areas (Naturschutzgebiete) dataset from Landesamt für Umweltschutz Sachsen-Anhalt.

The dataset contains the following fields (with example values):

gebietsnam gebietsnum rechtsgrun schutzzone erfassungs info_konta
Colbitzer Lindenwald STNSG0014___ VO v. 26.01.1939 (Amtsblatt der Regierung Magdeburg. - (1939)6 v. 11.02.1939) Kernzone TK10AS (1:10000)
Colbitzer Lindenwald STNSG0014___ VO v. 26.01.1939 (Amtsblatt der Regierung Magdeburg. - (1939)6 v. 11.02.1939) TK10AS (1:10000)
Fenn STNSG0008___ VO v. 20.11.1939 (Amtsblatt der Regierung Magdeburg. - (1939)39 v. 30.09.1939) TK10AS (1:10000)


Data source site:
Data license: see WFS capabilities [1] and written clarification (PDF files below, german)
Type of license: Attribution on Contributors page
OSM attribution:
ODbL Compliance verified: yes, see PDF files in github repo
Link to permission: yes, see PDF files in github repo

OSM Data Files

Located in github repo: tilmanb/ST-NSG-import.

Import Type

This is a one-time import.

The import will be executed manually using QGIS (for preparation) and JOSM for conflation with existing data and uploading.

Data Preparation

Data Reduction & Simplification

The WFS will be read in QGIS and saved as shapefile. The shapefile will be read in JOSM, where I'll run line simplify.

Tagging Plans

This is the source->osm attribute mapping.

source attribute osm attribute transform
gebietsnam name no transformation. Some names have encoding problems with "ß", those will be manually corrected in JOSM.
gebietsnum SGD-ID:ref replace( "gebietsnum",'_','')
rechtsgrun start_date regexp_replace( "rechtsgrun", '.*v. (\\d{2})\\.(\\d{2})\\.(\\d{4}).*','\\3-\\2-\\1')
schutzzone ignored
erfassungs ignored
info_konta ignored

Where the rechtsgrun transform fails, the value will be set manually (for "Alte Elbe bei Bösewig" there is a 2 digit year).

These attributes will further be set

key val
boundary protected_area
source Landesamt für Umweltschutz Sachsen-Anhalt
protect_class 4
protection_title Naturschutzgebiet
leisure nature_reserve
WDPA_ID:ref from wikidata, see below
wikidata from wikidata, see below


Using SPARQL, all Naturschutzgebiete in Sachsen-Anhalt will be loaded from wikidata, using this query:


#Naturschutzgebiete in Sachsen-Anhalt (Q1206)
SELECT ?nr ?nrLabel ?nrDescription ?website ?coord ?WDPA_id WHERE {
  ?nr wdt:P31 wd:Q759421.
  ?nr wdt:P131* wd:Q1206.
  ?nr wdt:P625 ?coord.
  OPTIONAL { ?nr wdt:P856 ?website. }
  OPTIONAL { ?nr wdt:P809 ?WDPA_id. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "de". }

These will then be exported as CSV, loaded into QGIS, attribute transformed (described at Import/Sachsen-Anhalt Naturschutzgebiete/Wikidata, because this is potentially useful for other QA work/imports) and saved as a shapefile, which will then be also loaded into JOSM and used to append the wikidata tag to the object. This will be a manual process, because the wikidata coordinates do not always fall within the OSM/import geometries.

Errors in wikidata data will be corrected, when encountered.

Changeset Tags

The changeset will be tagged

key val
source Landesamt für Umweltschutz Sachsen-Anhalt
import yes

Data Transformation

The attribute transformations are listed in the attribute mapping table. The code given is the QGIS expression to be used with the field calculator.

Geometries will be simplified using JOSM.

  • Where a Naturschutzgebiet boundary is defined by an administrative boundary, the Naturschutzgebiet boundary will be merged onto the nodes of the administrative boundary, so that the admin boundary remains geometrically unchanged and the Naturschutzgebiet boundary shares the nodes of the admin boundary.
    • The possible definition by an administrative boundary will be checked in JOSM by looking at admin boundaries. If admin boundary and Naturschutzgebiet boundary look suspiciously alike, the act of law defining the Naturschutzgebiet will have to be consulted.
  • Where a Naturschutzgebiet boundary is defined by the shore of a waterbody, the Naturschutzgebiet boundary will be merged onto the existing OSM shoreline. If the OSM shoreline seems way off compared to Bing imagery, the OSM shoreline will be adjusted.
    • The possible definition by a shoreline will be checked as with admin boundaries.
  • Where a Naturschutzgebiet boundary is defined by a highway, the boundary way shall not be merged onto the OSM highway nodes, unless the highway area is additionally tagged with area:highway.
    • Otherwise, the geometry should be adjusted follow the highway in appropriate distance.


The source dataset contains polygons that are tagged as "Kernzone". Those are conceptually part of the nature reserve, only with stricter access regulations. After discussion, we decided to discard this information, as there does not seem to be any established international tagging concept.

Thus, these polygons have been merged into the regular "Naturschutzgebiet" they belong to (manually, in JOSM).

Data Transformation Results

Post a link to your OSM XML files.

Data Merge Workflow

Team Approach

Currently we are Tbh-osm and g0ldfish.


Initial thread in german OSM forum: [3]


The actual import will consist of the following steps:

  • using JOSM to take one Landkreis each
  • upload all new Naturschutzgebiete in this Landkreis in one changeset
  • upload each preexisting Naturschutzgebiet in a changeset with only this Naturschutzgebiet.

Revert plan

  • because possibly breaking changes to existing areas will be contained in a single changeset with only this change in it, reverting the changeset will not affect the other imported geometries
  • all work will be done using the account Tbh-osm, which will not be used for day-to-day editing, so changesets should be easily identifiable
    • FIXME: other contributors?


  • Using JOSM, if a Naturschutzgebiet is already mapped, I will manually refine its geometry to match the import geometry with the least possible number of node changes.
    • If the import geometry and the OSM geometry differ significantly, I will not update the OSM geometry, but note the difference in the table below.
  • Tags will be taken from the import dataset iff this tag is not already set on the osm object. The import geometry will then be ignored, only the existing object will be uploaded in its own changeset.

Conflicts of tags between the preexisting OSM object and the import object will be documented here, community input will be taken on the german OSM forum as to how to deal with the differences.

This will then be done outside of the scope of the import process.

Geometry conflation conflicts

osm id name geometry difference proposed action action performed?
Way 41911105 (XML, Potlatch2, iD, JOSM, history) Jemmeritzer Moor this will be a link to a slippy web map showing the import geometry and OSM background. Those will be loaded as GeoJSON into leaflet hosted at github GIST.

example: [4]

... ...

Tag conflation conflicts

osm id key osm value import value proposed action action performed?
... ... ... ... ... ...


See conflation.

See also / useful links