This repository provides all information to set up a Contargo maps server containing Open Source Routing Machine (OSRM) and Nominatim and use these services from IRIS
Install OSRM in version 5.12 following the instructions on Building OSRM.
Now OSRM is able to extract the road network from our preprocessed map data with the truck profile.
Expose the OSRM service to "http://example.com/osrm" for example. So IRIS will be able to use OSRM as a service.
There are certain restrictions regarding which roads a truck is allowed to drive on in Germany depending on the aerial distance between start and end of a journey (more information).
Therefore the map needs to be processed twice with different profiles (profileLess75km
and profileMore75km
). For each processed map an OSRM instance should be started. The OSRM Profile Proxy is used to proxy every routing request. It takes the requests, calculates the aerial distance between start and end location and proxies it to the correct OSRM instance with the correct profile.
That's why there are two profiles, one for a distance of less than 75km between start and end and the other one for more than 75km. Hence you need to perform the map processing twice. It's important that there is a verkehrsverbot.lua
symlink to the respective profile (profileLess75km
or profileMore75km
) for each processing run. If you don't care about the differences in the less than 75km profile, one run is enough.
The OSRM Profile Proxy
should be exposed to "http://example.com/osrm"
If you want a GUI for OSRM you can install OSRM Frontend.
Install Nominatim v2.3.0 with the instructions provided at Nominatim.org. Use the unprocessed OSM map data. If you use the processed data you will not have all information in your data container. You can download unprocessed osm map data from Geofabrik
Recommended: PostgreSQL 9.3
Expose the Nominatim service to "http://example.com/nominatim" for example. So IRIS will be able to use Nominatim as a service.
IRIS can be downloaded here.
To use your own maps server with OSRM and Nominatim from IRIS you have to change two properties located in the application.properties
- nominatim.base.url=http://example.com/nominatim/
- osrm.url=http://example.com/osrm/route/v1/driving
If you exposed OSRM and Nominatim correctly on the proposed urls described above than IRIS can use OSRM and Nominatim.
The processed map data for truck routing can be downloaded here. The map data is available in the osm format. This format is human readable and can be versioned in a git repository. If you need this data in the pbf format you may convert it. That is very easy and you can find the description below.
You can find all necessary information about converting at the OpenStreetMap Wiki - OsmConvert
osmconvert processed.osm -o=processed.osm.pbf
osmconvert processed.osm.pbf -o=processed.osm
Data/Maps Copyright 2015 CONTARGO and OpenStreetMap Contributors | Map tiles: Creative Commons BY-SA 2.0 Data: ODbL 1.0