Mappy / fpm

A tool to transform geographical data into an OSM compatible format. Which can be used with all OSM tools like JOSM, OSRM, ...

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FPM

Build Status Coverage Status GitHub release

How to install

Prerequisites

  • 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 

Build

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

How to use

Download

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

Generate

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.

About

A tool to transform geographical data into an OSM compatible format. Which can be used with all OSM tools like JOSM, OSRM, ...

License:GNU General Public License v3.0


Languages

Language:Java 98.6%Language:HTML 0.7%Language:JavaScript 0.6%Language:Dockerfile 0.0%Language:Shell 0.0%