GraphHopper alternatives and similar libraries
Based on the "Geospatial" category
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of GraphHopper or a related project?
GraphHopper Routing Engine
GraphHopper is a fast and memory efficient Java routing engine, released under Apache License 2.0. By default it uses OpenStreetMap and GTFS data, but it can import other data sources.
All questions go to our forum where we also have subsections specially for developers, mobile usage, and our map matching component. Another place to ask questions is on Stackoverflow. Do not use our issue section for questions.
Read through [how to contribute](CONTRIBUTING.md) for information on topics like finding and fixing bugs and improving our documentation or translations!
To get started you can try [GraphHopper Maps](README.md#graphhopper-maps), read through our documentation and install the GraphHopper Web Service locally.
- stable 2.0: documentation, web service jar, announcement
- unstable 3.0: documentation, web service jar
Click to see older releases
- See our [changelog file](./core/files/changelog.txt) for Java API Changes.
- 1.0: documentation, web service jar, Android APK, announcement
- 0.13.0: documentation, web service jar, Android APK, announcement
- 0.12.0: documentation, web service jar, Android APK, announcement
- 0.11.0: documentation, web service jar, Android APK, announcement
- 0.10.0: documentation, web service zip, Android APK, announcement
- 0.9.0: documentation, web service zip, Android APK, announcement
- 0.8.2: documentation, web service zip, Android APK, announcement
- 0.7.0: documentation, web service zip, Android APK, announcement
To install the GraphHopper Maps and the web service locally you just do:
# download and install a JVM that supports at least Java 8 (https://adoptopenjdk.net) wget https://graphhopper.com/public/releases/graphhopper-web-2.0.jar https://raw.githubusercontent.com/graphhopper/graphhopper/stable/config-example.yml http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf java -Ddw.graphhopper.datareader.file=berlin-latest.osm.pbf -jar *.jar server config-example.yml
After a while you see a log message with 'Server - Started', then go to http://localhost:8989/ and you'll see a map of Berlin. You should be able to right click on the map to create a route.
For more details about the installation, see [here](./docs/web/quickstart.md).
To see the road routing feature of GraphHopper in action please go to GraphHopper Maps.
GraphHopper Maps uses the Directions API for Business under the hood, which provides a Routing API via GraphHopper, a Route Optimization API via jsprit, a fast Matrix API and an address search via Photon. Additionally, map tiles from various providers are used where the default is Omniscale. All of these are available for free, via encrypted connections and from German servers for a nice and private route planning experience!
For Public Transit
For Mobile Apps
There is a [web service](./navigation) that can be consumed by our navigation Android client.
There is the isochrone subproject to calculate and visualize the reachable area for a certain travel mode
[Isochrone Web API](../stable/docs/web/api-doc.md#isochrone)
[[Isochrone API image](./docs/isochrone/images/isochrone.png)](../stable/docs/web/api-doc.md#isochrone)
[Shortest Path Tree API](//www.graphhopper.com/blog/2018/07/04/high-precision-reachability/)
To support these high precision reachability approaches there is the /spt endpoint (shortest path tree). See #1577
GraphHopper supports several routing algorithms, such as
* and its bidirectional variants.
Furthermore, it allows you to use
Contraction Hierarchies (CH)
very easily. We call this speed mode; without this CH preparation, we call it flexible mode.
The speed mode comes with very fast and lightweight (less RAM) responses, although it does not use heuristics in its default settings. The downsides are that the speed mode allows only pre-defined vehicle profiles (multiple possible in GraphHopper) and requires a time consuming and resource-intensive preparation.
Then there is the hybrid mode which also requires preparation time and memory, but it is much more flexible regarding changing properties per request or e.g. integrating traffic data and more. Furthermore, this hybrid mode is slower than the speed mode, but it is an order of magnitude faster than the flexible mode and uses also less RAM for one request.
You can switch between all modes at request time.
Read more about the technical details [here](./docs/core/technical.md).
We chose the Apache License to make it easy for you to embed GraphHopper in your products, even closed source. We suggest that you contribute back your changes, as GraphHopper evolves fast, but of course this is not necessary.
OpenStreetMap is directly supported by GraphHopper. Without the amazing data from OpenStreetMap, GraphHopper wouldn't be possible at all. Other map data will need a custom import procedure, see e.g. Ordnance Survey, Shapefile like ESRI or Navteq.
Written in Java
GraphHopper is written in Java and officially runs on Linux, Mac OS X and Windows.
Embed GraphHopper with OpenStreetMap support into your Java application via the following snippet:
<dependency> <groupId>com.graphhopper</groupId> <artifactId>graphhopper-reader-osm</artifactId> <version>[LATEST-VERSION]</version> </dependency>
If you want to write your own import procedure, then use:
<dependency> <groupId>com.graphhopper</groupId> <artifactId>graphhopper-core</artifactId> <version>[LATEST-VERSION]</version> </dependency>
We've built the GraphHopper class which makes simple things easy and complex things like multi-modal routing possible. Still, you can use the low level API of GraphHopper and you'll see that it was created to allow fast and memory efficient use of the underlying data structures and algorithms.
Web UI and API
With the web module, we provide code to query GraphHopper over HTTP and decrease bandwidth usage as much as possible. For that we use an efficient polyline encoding, the Ramer–Douglas–Peucker algorithm, and a simple GZIP servlet filter.
GraphHopper also runs on the Desktop in a Java application without internet access. For debugging purposes GraphHopper can produce vector tiles, i.e. a visualization of the road network in the browser (see #1572). Also a more low level Swing-based UI is provided via MiniGraphUI in the tools module, see some visualizations done with it here. A fast and production ready map visualization for the Desktop can be implemented via mapsforge or mapsforge vtm.
Here is a list of the more detailed features:
- Based on Java and simple start for developers via Maven.
- Works out of the box with OpenStreetMap (osm/xml and pbf) and can be adapted to custom data
- OpenStreetMap integration: stores and considers road type, speed limit, the surface, barriers, access restrictions, ferries, conditional access restrictions, ...
- GraphHopper is fast. And with the so called "Contraction Hierarchies" it can be even faster (enabled by default).
- Memory efficient data structures, algorithms and [the low and high level API](../stable/docs/core/low-level-api.md) is tuned towards ease of use and efficiency
- Multiple weightings (fastest/shortest/custom/...) and pre-built routing profiles: car, bike, racing bike, mountain bike, foot, hike, motorcycle, wheelchair, ...
- [Customization of these profiles](../stable/docs/core/profiles.md#custom-profiles) are possible to get truck and cargo bike support or individual improvements
- Supports public transit routing and [GTFS](../stable/reader-gtfs/README.md).
- Offers turn instructions in more than 42 languages, contribute or improve [here](../stable/docs/core/translations.md)
- Displays and takes into account [elevation data](../stable/docs/core/elevation.md)
- Can apply real time changes to edge weights (flexible and hybrid mode only)
- Alternative routes
- [Turn costs and restrictions](../stable/docs/core/turn-restrictions.md)
- Country specific routing via SpatialRules
- The core uses only a few dependencies (hppc, jts and slf4j)
- Scales from small indoor-sized to world-wide-sized graphs
- Finds nearest point on street e.g. to get elevation or 'snap to road' or being used as spatial index (see #1485)
- Does map matching
- Calculates isochrones and shortest path trees
- Shows the whole road network in the browser for debugging purposes ("vector tile support") #1572
- Shows details along a route like road_class or max_speed ("path details") #1142 or for the whole road network via vector tiles
*Note that all licence references and agreements mentioned in the GraphHopper README section above are relevant to that project's source code only.