This project is WIP! Nothing works at all and it's under heavy construction.
check this as config parser http://profig.readthedocs.io/en/default/guide.html
sudo pacman -S nodejs npm
npm install tileserver-gl-light yaml log4js
We want a fully offline system. Therefore all map data is locally and needs software to render and serve it as well as find routes on the map. Also we want to be able to easily query for locations.
sudo pacman -S protobuf geos libspatialite jq
git clone [email protected]:zeromq/czmq.git
cd czmq
git checkout tags/v4.0.2
./autogen.sh
./configure --prefix=$HOME/workspace/satnavpi/libs
make check
make install
cd ..
git clone [email protected]:kevinkreiser/prime_server.git
cd prime_server
git checkout tags/0.6.3
./autogen.sh
CFLAGS=-I$HOME/workspace/satnavpi/libs/include LDFLAGS=-L$HOME/workspace/satnavpi/libs/lib PKG_CONFIG_PATH=$HOME/workspace/satnavpi/libs/lib/pkgconfig ./configure --prefix=$HOME/workspace/satnavpi/libs
make
make install
cd ..
git clone [email protected]:valhalla/valhalla.git
git checkout tags/2.1.8
cd valhalla
git submodule update --init --recursive
./autogen.sh
CFLAGS=-I$HOME/workspace/satnavpi/libs/include LDFLAGS=-L$HOME/workspace/satnavpi/libs/lib PKG_CONFIG_PATH=$HOME/workspace/satnavpi/libs/lib/pkgconfig ./configure --prefix=$HOME/workspace/satnavpi/libs
make test -j$(nproc)
Change into project root, retrieve OSRM and compile it. If you run into trouble, check out their build instructions. Same for the stxxl library.
# fetch dependencies via pacman
sudo pacman -S boost intel-tbb
# stxxl via pacman or yaourt not really working, compile from source
git clone https://github.com/stxxl/stxxl
git checkout tags/v1.4.1
cd stxxl
mkdir build
cd build
cmake ..
make
sudo make install
# get and compile OSRM from source
git clone https://github.com/Project-OSRM/osrm-backend.git
git checkout tags/v5.6.3
cd osrm-backend
mkdir -p build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build .
sudo cmake --build . --target install
Here comes the part that is key to offline usage. Data! Download as much as you like, OSRM claims to be able to handle "continent scale routing", but that also means you need lots of storage.
Pick a region of your preference and download it to the maps/tiles
folder.
Next we need to prepare the data. Again, if you run into problems, check their wiki.
cd maps/tiles
# replace with absolute path
echo "disk=<path-to-project>/satnavpi/maps/tiles/stxxl,20000,syscall" > .stxxl
../../osrm-backend/build/osrm-extract germany-latest.osm.pbf -p ../../osrm-backend/profiles/car.lua
../../osrm-backend/build/osrm-contract germany-latest.osrm
You can test this (why not):
../../osrm-backend/build/osrm-routed germany-latest.osrm
open: http://localhost:5000/route/v1/driving/13.388860,52.517037;13.385983,52.496891?steps=true
TL;DR Execute this stuff on a powerful machine with lots of RAM!
Just for reference, the the raw file for Germany is 2.8GB and extracts to around 6GB. For processing, a 20GB temporary file (see the .stxxl config) was sufficient, it took almost an hour to run on a 12GB RAM (started swapping sometimes) machine with an i7.
- Message Access Profile (MAP), send and receive SMS
- Phone Book Access Profile (PBAP, PBA), display names, download phonebook, issue calls
- Advanced Audio Distribution Profile (A2DP), Bluetooth Audio Streaming
- Mapbox GL offline
- Leaflet Routing Machine
- TileserverGL for offline Vector rendering
- https://github.com/perliedman/leaflet-routing-machine/tree/v3.2.5/dist
npm run watch
osrm-backend/build/osrm-routed maps/tiles/germany-latest.osrm