- Java JDK 8
- Maven
- Docker (optional)
- Osmonaut (third party library)
The Osmonaut
library can be installed from the project root directory with the following command:
mvn install:install-file -Dfile=./libs/osmonaut-1.0.2.4.jar -DgroupId=net.morbz -DartifactId=osmonaut -Dversion=1.0.2.4 -Dpackaging=jar
In the project root directory:
./build.sh
What this script does:
- Add a third party library into the local maven repository: net.morbz.osmonaut
mvn install:install-file -Dfile=./libs/osmonaut-1.0.2.4.jar -DgroupId=net.morbz -DartifactId=osmonaut -Dversion=1.0.2.4 -Dpackaging=jar
- Generate a jar, from source code, with maven
mvn clean install
- Generate a docker image with the previous jar
cp target/fpm-1.1-SNAPSHOT.jar src/main/docker/fpm/target docker build -t mappy/fpm ./src/main/docker/fpm
docker run --rm -v /tmp/tomtomfiles:/workspace -p 9501:9501 -t mappy/fpm com.mappy.fpm.batches.tomtom.download.json.MapContentDownloader /workspace yourToken 2016.09
cd /tmp/naturalEarth
wget http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/10m_cultural.zip
wget http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/physical/10m_physical.zip
unzip -o -j 10m_cultural.zip
unzip -o -j 10m_physical.zip
With Docker:
docker run --rm -v /tmp/tomtomfiles:/input -v /tmp/data:/output -p 9501:9501 -t mappy/fpm com.mappy.fpm.batches.GenerateFullPbf "Belgique,Luxembourg" "/input" "/output" Europe.osm.pbf 2
docker run --rm -v /tmp/data:/workspace -v /tmp:/inputFolder -t mappy/fpm com.mappy.fpm.batches.merge.MergeNaturalEarthTomtom
Or locally:
java -cp target/fpm-1.1-SNAPSHOT.jar com.mappy.fpm.batches.GenerateFullPbf "Belgique,Luxembourg" "/tmp/tomtomfiles" "/tmp/data" Europe.osm.pbf 2
To generate tolls data, a tolls.json file must be present in the /input directory.