... the user friendly GPS tool


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
offline routeconverter ->graphhopper
#1
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.
Reply
#2
(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
--
Christian
Reply
#3
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)
Reply
#4
(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.
--
Christian
Reply
#5
(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.
--
Christian
Reply
#6
Almost every .osm.pbf files from download.geofabrik.de has a bounding box now as you can see on http://api.routeconverter.com/v1/datasou...format=xml

Does it work better now?
--
Christian
Reply
#7
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]
Reply
#8
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).
Reply
#9
(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.
--
Christian
Reply
#10
Stack trace? Please give some advice.Where do I find that?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)