Conversion from Norwegian ELVEG road-data to OpenStreetMap
This project is archived. See nvdb2osm for the new import tool, which uses the API from Nasjonal Vegdatabase
Note: elveg2osm only works with python2
, not with python3
. You need to install the requirements with pip2
and run the program with python2
if both are installed.
-
Install the required Python packages thusly:
pip2 install -r requirements.txt
-
Get your data files from Geonorge.no- ELVEG or from /geonorge/Samferdsel/Elveg/SOSI and unpack your files.
-
Unpack the
XXXXElveg.zip
, and put the unpacked files somewhere handy. -
Run the program from the elveg2osm-folder thusly:
python2 elveg2osm.py DIRECTORY MUNICIPALITY_NUMBER
Example:
python2 elveg2osm.py 1201Elveg 1201
(Given your ELVEG-data is in the folder "1201Elveg", and that the municipalitynumber is 1201.)
- After the program succeeds, the input-directory contains a file called XXXXElveg_default, which is the output of the command
sosi2osm XXXXElveg.SOS default.lua >XXXXElveg_default.osm
, and at least the fileXXXXFart.txt
.
XXXX is the 4-digit municipality number, listed for example at wikipedia.
- sosi2osm: For converting the initial SOSI file to OSM format (without changing the tags).
- Our fork of the source code at github.com/osmno/sosi2osm.
- Ubuntu PPA at ppa.launchpad.net/saltmakrell/osm/ubuntu.
- Available in Debian unstable.
- osmapis: Python module used for reading/writing/abstracting OSM-files.
- Our fork of the source code at github.com/osmno/osmapis.
- geographiclib: Python module used for computing distances between nodes.
- Homepage at geographiclib.sourceforge.net.
- Source code at pypi.python.org/pypi/geographiclib.