RouteConverter Forum
offline routeconverter ->graphhopper - Printable Version

+- RouteConverter Forum (https://forum.routeconverter.com)
+-- Forum: Users (https://forum.routeconverter.com/forum-17.html)
+--- Forum: English: Discussions (https://forum.routeconverter.com/forum-12.html)
+--- Thread: offline routeconverter ->graphhopper (/thread-2031.html)

Pages: 1 2


offline routeconverter ->graphhopper - hvdwolf - 12.07.2015

Hi,

I also referred to it in thread: http://forum.routeconverter.com/thread-2024.html that routeconverter downloads the wrong maps for graphhopper.

Now I'm trying to calculate a route with the offline version using grapphopper around Zwolle, Netherlands. It is downloading nordrhein-westfalen.

And when I try to route from Zoeterwoude, Nederland to Den Haag, Nederland, it tries to download the 15GB Europe-latest instead of the Netherlands map.

Why?

Can I perhaps help improving this? As the current algorithm or setup or whatever it is, is totally inacurrate.


RE: offline routeconverter ->graphhopper - routeconverter - 13.07.2015

(12.07.2015, 20:11)hvdwolf Wrote: Can I perhaps help improving this? As the current algorithm or setup or whatever it is, is totally inacurrate.

The problem is that GraphHopper doesn't support a tile download like BRouter, i.e. it wants to have the routing data map for a region and then work with it.

Currently, I've solved this by determining the bounding box of the route and then finding the smallest routing data map that covers the bounding box of the route.

Code:
   public DownloadFuture downloadRoutingDataFor(List<LongitudeAndLatitude> longitudeAndLatitudes) {        BoundingBox routeBoundingBox = createBoundingBox(longitudeAndLatitudes);        Downloadable downloadableForSmallestBoundingBox = null;        BoundingBox smallestBoundingBox = null;        for (File file : dataSource.getFiles()) {            BoundingBox fileBoundingBox = file.getBoundingBox();            if (fileBoundingBox != null && fileBoundingBox.contains(routeBoundingBox)) {                if (smallestBoundingBox == null || smallestBoundingBox.contains(fileBoundingBox)) {                    downloadableForSmallestBoundingBox = file;                    smallestBoundingBox = fileBoundingBox;                }            }        } [..]

The resulting downloadableForSmallestBoundingBox is then used to route the complete route. The only improvement I could imagine is to determine the downloadableForSmallestBoundingBox for each pair of coordinates


RE: offline routeconverter ->graphhopper - hvdwolf - 14.07.2015

Im afraid you algorithm for that bounding box for the route doesn't work correctly. I did see that graphhopper downloads the osm.pbf files from geofabrik.
I mentioned that I calculated a route around Zwolle. The bounding box (I calculate) for the route is clearly and wide within the Netherlands and doesnt even come close to nordrhein-westfalen.
Same for Zoeterwoude to Den Haag: that bounding box is really and definitely inside the Netherlands. However, whichever route I try in the Netherlands, even if it is dead center in the Netherlands, never the netherlands-latest.osm.pbf is downloaded.

I'm not a java programmer so I do not entirely understand the code you are displaying, but I assume you estimate the route bounding box on the (min-latitude, min-longitude), (max-latitude, min-longitude), (max-latitude, max-longitude) and (min-latitude, max-longitude) of all the route points given.
(Or otherwise: bottom-left, top-left, top-right, bottom-right)


RE: offline routeconverter ->graphhopper - routeconverter - 15.07.2015

(14.07.2015, 21:37)hvdwolf Wrote: Im afraid you algorithm for that bounding box for the route doesn't work correctly.

It does - but the data is faulty: the europe/netherlands-latest.osm.pbf has no bounding box Sad

I'll try to figure out, why.


RE: offline routeconverter ->graphhopper - routeconverter - 15.07.2015

(15.07.2015, 11:57)routeconverter Wrote: I'll try to figure out, why.

The bounding box calculation for the .osm.pbf files from download.geofabrik.de is unstable. But I've managed to add bounding boxes for Netherlands and Luxembourg and some other countries. Still this needs to be improved and I'll be working on it.


RE: offline routeconverter ->graphhopper - routeconverter - 18.07.2015

Almost every .osm.pbf files from download.geofabrik.de has a bounding box now as you can see on http://api.routeconverter.com/v1/datasources/graphhopper/?format=xml

Does it work better now?


RE: offline routeconverter ->graphhopper - hvdwolf - 19.07.2015

I downloaded the latest offline prelease for linux today (19 July) and that one does download Netherlands when using graphhopper, but once downloaded it never calculates a route. Neither after restarting.
Then I wanted to calculate a route in and around York (leaving for England tonight) and it downloaded north-yorkshire but again it doesn't calcualte a route. I tried also to calculate a route of about 1-2 km but no route is calculated.

I find in the RouteConverter.log:
jul 19, 2015 2:08:00 PM slash.navigation.graphhopper.GraphHopper initializeHopper
WARNING: Cannot initialize GraphHopper: java.lang.ArrayIndexOutOfBoundsException: 0
jul 19, 2015 2:08:03 PM slash.navigation.gui.SimpleDialog dispose
INFO: Storing dialog options location as java.awt.Point[x=687,y=117]



RE: offline routeconverter ->graphhopper - hvdwolf - 19.07.2015

And then it crashed my chromebook!!

After reboot it calculated the route in York.
But it did not calculate the route in the Netherlands. So I tried to calculate a route inside Zwolle, my hometown, and it started downloading the dach map. The alps zone of Germany-Austria-Switzerland is not even close (would be nice during the winter though).


RE: offline routeconverter ->graphhopper - routeconverter - 20.07.2015

(19.07.2015, 13:07)hvdwolf Wrote: I downloaded the latest offline prelease for linux today (19 July) and that one does download Netherlands when using graphhopper, but once downloaded it never calculates a route. Neither after restarting.

I find in the RouteConverter.log:
jul 19, 2015 2:08:00 PM slash.navigation.graphhopper.GraphHopper initializeHopper
WARNING: Cannot initialize GraphHopper: java.lang.ArrayIndexOutOfBoundsException: 0

An exception which stop the route calculation. Now the stacktrace would be really helpful.


RE: offline routeconverter ->graphhopper - hvdwolf - 20.07.2015

Stack trace? Please give some advice.Where do I find that?