GraphHopper calculates optimal routes in road networks (for example taken from OpenStreetMap) for many different vehicle types and finds the ideal itinerary when using public transit. It is released under the Apache License 2.0 and you can easily try its road routing capabilities on GraphHopper Maps. Besides the route calculations the GraphHopper engine offers a lot more features like the map matching (“snap to road”), the navigation and the isochrone calculation (for a point it finds all reachable roads within a specified time). See the end of this post for some impressions and view GraphHopper on Github!
Since the last stable release 0.13 a few months ago we merged over 115 pull requests and were able to fix over 50 issues on Github. Many contributors were involved in the new 1.0 release:
Customizable routing: influence the chosen route (green) via user-defined configuration that requires no programming knowledge (red box). This allows things like creating an individual truck profile with a custom width, height and speed, or avoiding certain kinds of roads. Read this blog post to get started with the new feature.
Customizable routing again: Here the bike mode is forced to prefer official bike routes even though this means a big detour. Another use case would be a cargo bike where additional properties like road width are taken into account.
The new curb side feature: Force approaching the destination (red marker) via the left side of the road
… or the right side of the road. The same is possible for the start location.
Public transit routing via OSM and GTFS data using the new user interface
The new features in more detail:
Customizable routing: Without knowledge of Java and just some JSON (or YAML) configuration you can now tweak the default vehicle profiles. You can do this on a per-request basis, but also use your configuration with the fast hybrid- and speed modes. Use this to avoid bridges, motorways, ferries, steps or certain areas, avoid roads with truck limits, change the speed or max_speed variables or prioritize certain road classes like official bike routes. You can get very creative here! From @karussell and @easbar. To find out more see the documentation, issue #1841 and this blog post. Or try on this demo server and click on the flex icon near the ‘Search’ button.
A major code refactoring that includes turn costs calculation within the ‘Weighting’ class from @easbar. See our changelog.
A major refactoring towards profiles that replaces the ‘weighting’ and ‘vehicle’ parameters with a new ‘profile’ parameter. This requires some configuration changes. For the most cases you can use our converter tool. See the documentation. From @easbar.
Alternative route calculations are now much faster as they benefit from node- or edge-based Contraction Hierarchies #1722 from @michaz
Isochrone refactorings and improvements like edge-based graph traversal and turn restriction support from @michaz. See e.g. #1824.
Add new ‘curbside’ parameter #1697 to approach roads from a specific side from @easbar.
Bilinear interpolation for elevation #1942 from @msbarry
Many changes and improvements for spatial rules from @otbutz
Several bug fixes for the Landmark algorithm from @michaz and @aoles
a new POST /route endpoint, in addition to the GET /route endpoint, which avoids URL-length limitations, allows request compression and more from @karussell
More encoded values like EU tunnels, hazmat (hazardous materials), etc. from @otbutz
A new vehicle profile ‘wheelchair’ #1726 from @don-philipe
Many bug fixes for the block_area and the country feature from @karussell
Improvement for point hints #1935, from @samruston. This additionally improved query speed by 10%.
A big improvement to reduce the memory requirements for the import. Mainly from @msbarry
A new user interface for public transit from @Janekdererste and @michaz
Improved turn instructions like #1882 (or this) from @boldtrn
Edge-based Tarjan algorithm and subnetwork removal to avoid connection not found problems if turn restrictions are enabled (#2044) from @easbar
A good speed improvement for path details from @easbar
Turn instructions now give hints about ferries, tolls and private roads
Start to use JUnit5 in tests from @Anvoker and @easbar
A StringIndex allowing to store strings per edge that will allow several improvements for turn instructions in the future
The new features complement these existing features:
Very fast response times for normal routing from A to B. For different travel modes like car and walking. The routing engine supports turn restrictions and more generic turn costs.
The route responses can include elevation and path details like road class, surface, toll, max_speed which is shown in the widget in the bottom right corner.
The isochrone module to calculate the areas reachable from a center point. The green area is reachable within 5 minutes and the blue within 10 minutes.
GraphHopper supports also public transit time-dependent routing using GTFS and OpenStreetMap data. Here the isochrone for 20 minutes is shown. Note the islands, and they are not artifacts, but part of the story. You can get to a far-away place, but you can’t get off the bus in between.
Offline Routing for Android and iOS
A 100% open source navigation demo app for Android. The turn instructions are translated to over 40 languages.
Block or avoid an area, or just decrease the speed for an area.
Round trip feature
The shortest path tree endpoint allowing to get deep insights in the road network and topology
Serve vector tiles directly from GraphHopper for debugging purposes
The map matching module “snaps” your GPS tracks to the road network to get data like max_speed values for your recorded tracks and more.