Skip to content

graphhopper-graph

GraphHopper's route graph built from your own regions, for routes on the browser map

What it does

Builds one GraphHopper route graph over every map region you have set, with four profiles (car, bike, foot and hike), and installs it under /usr/local/share/hammunition/data/graphhopper-graph/. It runs GraphHopper's own import as the operator in a staging directory, the regions merged into one input when there are two or more, so a route may cross from one region into the next. hammunition reference serve serves it to the browser map's Route control.

Why you would want it

GraphHopper routes only over a graph built for it, and nobody publishes one to download; this one is built on your machine from the map data Hammunition already downloaded and verified, and covers exactly your regions.

Before it will work

osm-regions with at least one region set; with none, installing this unit is refused, and the refusal says how to set them. graphhopper (installed with it). Install it by name: hammunition install graphhopper-graph; it is in no profile.

How it installs

  • converted from osm-regions by graphhopper-import (ODbL-1.0, https://www.openstreetmap.org/copyright)

Known problems

Measured on Delaware, a public example state, by the routing spike on 2026-09-29: the import took 58 seconds on a busy 8-core host and 1.2 GB of memory, and the graph took 78 MB from a 22.1 MB download. The plan counts the graph at 3.7 times all the downloads together, once in the staging directory while it builds and again under /usr/local; memory on anything larger than Delaware is not measured, and Java's heap is capped at 4 GB, so a very large region may fail for memory, by name. One region that fails fails the whole build, and the installed graph is left as it was. Every step's command was run on the development host against the pinned jar with synthetic regions, and GraphHopper routed over the result. Not yet run: a real region through hammunition install.

Keeping it current

  • probe: none
  • strategy: reinstall
  • Rebuilt whenever the set of regions, a region's snapshot, GraphHopper's jar or the converter changes; otherwise left as it is.

Where to get help with the software itself

The import is GraphHopper's own import command; issues about it go to GraphHopper's GitHub issues or its forum, https://discuss.graphhopper.com/.

Source: catalog/packages/graphhopper-graph.yaml