Difference between revisions of "OpenStreetMap"
(→Routing) |
(→Routing) |
||
Line 23: | Line 23: | ||
if [ ! -d "$DATADIR" ] ; then | if [ ! -d "$DATADIR" ] ; then | ||
echo Opretter $DATADIR | echo Opretter $DATADIR | ||
− | mkdir -p $DATADIR | + | mkdir -p $DATADIR || exit |
fi | fi | ||
Line 31: | Line 31: | ||
− | cd | + | cd ~ |
git clone https://github.com/Project-OSRM/osrm-backend.git | git clone https://github.com/Project-OSRM/osrm-backend.git | ||
Line 39: | Line 39: | ||
cmake .. | cmake .. | ||
− | make -j 2 | + | make -j 2 || exit |
make install | make install | ||
fi | fi | ||
Line 54: | Line 54: | ||
fi | fi | ||
− | cd | + | cd ~/osrm-backend* |
if [ ! -f $DATADIR/denmark-latest.osrm ] ; then | if [ ! -f $DATADIR/denmark-latest.osrm ] ; then |
Revision as of 21:58, 1 October 2015
GeoCoding
Routing
#!/bin/bash DATADIR=/mnt/qnap/openstreetmap if [ ! -d "$DATADIR" ] ; then echo Opretter $DATADIR mkdir -p $DATADIR || exit fi if [ ! -f /usr/local/bin/osrm-extract ] ; then apt-get install build-essential git cmake pkg-config libprotoc-dev protobuf-compiler libprotobuf-dev libosmpbf-dev libpng12-dev libbz2-dev libstxxl-dev libstxxl-doc libstxxl1 apt-get install libxml2-dev libzip-dev libboost-all-dev lua5.1 liblua5.1-0-dev libluabind-dev libtbb-dev cd ~ git clone https://github.com/Project-OSRM/osrm-backend.git cd osrm-backend mkdir -p build cd build cmake .. make -j 2 || exit make install fi ########################################## cd $DATADIR if [ ! -f denmark-latest.osm ] ; then wget http://download.geofabrik.de/europe/denmark-latest.osm.bz2 bunzip2 denmark-latest.osm.bz2 fi cd ~/osrm-backend* if [ ! -f $DATADIR/denmark-latest.osrm ] ; then osrm-extract $DATADIR/denmark-latest.osm fi if [ ! -f $DATADIR/denmark-latest.osrm.edges ] ; then osrm-prepare $DATADIR/denmark-latest.osrm fi cd $DATADIR osrm-routed denmark-latest.osrm