Converting DB Netz Railway Network into GeoJSON
Tenra converts the railway network data in INSPIRE format into GeoJSON format.
DB Netz AG is the rail infrastructure company of the Deutsche Bahn AG (the German Railways) and is responsible for the approximately 33.000 km long rail network.
Since November 2015 DB Netz AG publishes the geodata of the railway network in the DB Open Data Portal under the Creative Commons Attribution 4.0 International (CC BY 4.0) license.
The problem is, however, that the INSPIRE format used for this publication is not completely straightforward and cannot be fully processed by the usual GIS tools (like QGIS). As a result, a lot of attributes go missing in the layers. For instance, railway lines miss the track numbers or railway station nodes miss the station codes.
The Tenra projects aims to overcome these problems by providing a converter from the INSPIRE format to the standard GeoJSON format which can be processed by most of the GIS tools out there.
Usage
- Download and extract DB_Inspire_XML.zip from the DB Open Data Portal here.
- You'll get an XML file like
DB-Netz_INSPIRE_20131128.xml
- Use
tenra-<VERSION>.jar
to convert the extracted XML file:
java -jar tenra-<VERSION>.jar DB-Netz_INSPIRE_20131128.xml
- You'll get the following files ins GeoJSON format (features):
railwayStationNodes.geojson
- Stations/stopsrailwayLines.geojson
- Railway linesmarkerPosts.geojson
- Kilometer marksrailwayNodes.geojson
- Railway nodesrailwayLinks.geojson
- Railway linksrailwayLinkSequences.geojson
- Sequences of railway links
Licenses
- The original DB Netz INSPIRE dataset is published under the Creative Commons Attribution 4.0 International (CC BY 4.0) license
- The resulting files will fall under the same Creative Commons Attribution 4.0 International (CC BY 4.0) license
- Don't forget the attribution:
You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- Don't forget the attribution:
- Tenra (this project) is published under the MIT License