GraphHopper is a fast and Open Source routing engine written in Java. The sources are at Github and you can try it online. Some months ago Java itself was ported to Raspberry Pi (ARM) and the latest versions even have the JDK from Oracle preinstalled. So there is no reason to not trying GraphHopper on Raspberry Pi as today my device arrived! I was using NOOBS and installed Raspbian where the JDK from Oracle and git-core were already installed. If you have an older release do:

sudo apt-get install oracle-java7-jdk

Now the GraphHopper setup itself is done with 4 easy steps, you’ll need internet access for downloading some files as well as for displaying the tiles:

git clone https://github.com/graphhopper/graphhopper/ # Avoid the “-server” option and reduce the default memory usage for graphhopper. E.g. for Berlin you can do:

export JAVA_OPTS=”-Xmx100m -Xms100m”; cd graphhopper ./graphhopper.sh import europe_germany_berlin.pbf

# This will take a bit and if it is finished you’ll see “[INFO] Started Jetty Server”. You should do this on your desktop and copy the resulting ‘europe_germany_berlin-gh’, ‘core/target’, ‘web/target’ and ‘tools/target’ folders instead of waiting so long. Under the hood it will do:

# 1. get maven

# 2. compile GraphHopper (takes 10min!?)

# 3. install a smaller area ‘Berlin’ (6min for import, 5min for CH preparation). You can avoid this if you create the GraphHopper files on your Desktop which is a lot faster and then copy them to your Raspberry Pi via scp -r europe_germany_berlin-gh pi@raspberrypi:/home/pi/graphhopper/

# 4. start a server at localhost:8989 Now you can access the started server via your browser e.g. from Raspberry Pi itself with iceweasel or chromium-browser (midori won’t work)

http://raspberrypi:8989/

If this doesn’t work try http://localhost:8989/ or connect Pi to your LAN and access GraphHopper web from your Desktop via the same URL.

Here is a screenshot – via tiles from Lyrk:

Raspberry Pi has less limitations compared to Android!

