GraphHopper Maps - High Performance and Customizable Routing in Java
Today we're proud to announce the first stable release of GraphHopper! After over a year of busy development we finally reached version 0.1!
GraphHopper is a fast and Open Source road routing engine written in Java based on OpenStreetMap data. It handles the full planet on a 15GB server but is also scales down and can be embedded into your application! This means you're able to run Germany-wide queries on Android with only 32MB in a few seconds. You can download the Android offline routing demo or have a look at our web instance which has world wide coverage for car, bike and pedestrian:
The trip to the current state of GraphHopper was rather stony as we had to start from scratch as there is currently no fast Java-based routing engine. What we've built is quite interesting as it shows that a Java application can be as fast as Bing or Google Maps (in 2011) and beats YOURS, MapQuest and Cloudmade according to the results outlined in a Blog post from Pascal and with tests against GraphHopper - although OSRM is still ahead. But how can a Java application be so fast? One important side is the used algorithm: Contraction Hierarchies - a 'simple' shortcutting technique to speed up especially lengthy queries. But even without this algorithm GraphHopper is fast which is a result of weeks of tuning for less memory consumption (yes, memory has something to do with speed), profiling and tweaking. But not only the routing is fast and memory efficient also the import process. And it should be easy to get started and modify GraphHopper to your needs.
Why would you use GraphHopper?
GraphHopper could be especially useful for more complicated or custom shortest/best path projects. E.g. if you need
- to embed GraphHopper or only parts of it directly within your Java application, which is easily possible due to the Apache 2 license.
- offline queries for your Android application
- highly customized routing (like horse routing - see below) where Google/Bing API calls aren't sufficient or even possible
- many to many queries
- the shortest path tree(s) directly
... you should tell us on the mailing list what you need!
GraphHopper is a young project but it makes great strides and it is already used in GPSies and in more places (cannot disclose all yet).
Last but not least I would like to thank NopMap for his work regarding OSM import and tuning, elevation data and much
more! You can try out his horse routing prototype based on GraphHopper at the German WanderReitKarte.de ("trail riding map")!
See the description on how you can contribute.
Have fun!Original article at: karussell.wordpress.com
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)