App: Offline routing (GraphHopper)

Hi. Thanks for the quick response. Please don’t get me wrong: I am highly impressed what a great user experience two individuals are able to deliver. I guess that’s only possible with a high passion for motorcycling.
I only wanted to understand what the real challenge is with the offline routing: technical limitations or something else. It looks like it’s resources/budget so I will patiently wait for the functionality or let’s try to crowd fund an additional developer for this :slight_smile: - if people are willing to pay ~60bugs one time plus ~30bugs on a yearly basis to buy something which is less convenient than the Kurviger App… you never know :slight_smile:

1 Like

Gestern seit langer Zeit wieder mal mit dem Moped unterwegs gewesen. Start und Ziel gewählt, die Navigation funktionierte super.
Respekt dafür.
Jedoch wollte ich am Zielpunkt beim Essen eine Route nach Hause planen, ging aber leider nicht, da es in der Gegend (wie zu oft in D kein Netz gab).
So musste ich erst mal losfahren, warten bis ich wieder Netz hatte, anhalten und wieder eine Route planen,
Würde mich auch sehr freuen, falls die Offlinenavigation mal kommt.
Ansonsten alles super. :+1:
Gruß Oliver

3 Likes

Offline routing is now available in Kurviger:

  • Route planning: all routing calculations fallback to offline routing profile when there is no online connection.
  • Navigation: offline partial rerouting is calculated from user’s location to the route (based on rerouting mode).
    Offline reroute section joins the rest of the existing curvy route and navigation continues on the merged route.
    Every other “rerouting” nav activity should work similarly offline, like avoid road block or skip next waypoint.

Offline routing requires the presence of offline graphs (folders of routing data) for each region.
There are available offline graphs for each region in our new download server (like offline maps).
Unpack the downloaded zip in mobile device and load the graph via application’s routing menu.

Likewise the Mapsforge server also provides worldwide offline graphs.

You can also create offline routing graphs with desktop Cruiser:

  • Download any osm/pbf file from Geofabrik for your region.
  • Select “Speed mode” or “Flexible mode” and check the “Car” in the menu “Routing | Graph options”.
    “Speed mode” offers faster offline routing on mobile, though graph creation is slower on desktop.
  • Create the graph via menu “Routing | Create graph”: select any downloaded osm/pbf file and then an empty folder for graph output.
    Depending on region size and available memory, can increase Java heap size (Xmx) in bat / sh files and run Cruiser with them.
  • Move the created graph folder in mobile device and load the graph via application’s routing menu.

Offline routing currently has the following properties:

  • Offline routing calculations use the fastest profile (no curvy algorithms).
    If Robin can implement them to work offline on mobile, then I can add them.
  • No straightforward cross border offline routing yet (limitation of library).
    Depends also on input osm/pbf bounds (Geofabrik usually provides countries).
    Or use special region wide graphs: Alps, DACH (Germany+Austria+Switzerland).
  • I’ll also add BRouter offline routing, which doesn’t have these limitations.

Available in menu “Routing | Open data”.

3 Likes

See Kurviger 1.12 (Beta).

WOW - great news! I’m really looking forward to test this new feature. :+1:

1 Like

Habe es gerade auf 2x Geräten getestet mit dem Flugmodus, auf meinem Honor View 20 funktioniert es. Bei meinem Ulefone S8 kommt, wenn ich die Offlineroutendaten öffnen will, die Meldung "Ungültige Routendaten. Auf beiden Handys verwende ich die gleichen Dateien, was könnte das Problem sein? Eigentlich wollte ich gerne das Ulefone als Navigationsgerät einsetzen.

Just tested it on 2x devices with the flight mode, on my Honor View 20 it works. On my Ulefone S8, when I want to open the offline route data, the message "Invalid route data. On both phones I use the same files, what could be the problem? Actually I wanted to use the Ulefone as a navigation device.

That is a sign that the routing data are not valid and so cannot load them.

Are you sure that they were downloaded completely, extracted correctly, all files are in there, etc. ?

Which region is that?
What file manager do you use to unzip them?

There have been reports for some Android or devices that have trouble with very large zip (GB) sizes.

A recommendation is to download once the offline graphs on pc, unzip them on hard disk and then transfer their folders in all Android devices via usb or a remote access program, e.g.:

Ich habe beim ersten Mal die Daten 1:1 vom anderen Handy per USB-Kabel heruntergeladen. Um sicher zugehen das nichts beim Kopieren schief gelaufen ist, habe ich die Daten neu, von https://download.kurviger.de, auf meinem PC geladen. Danach entpackt und auf das Ulefone per USB-Kabel verschoben. Der Fehler tritt wieder auf. Helfen die Daten vom Telefon weiter https://geizhals.de/ulefone-s8-schwarz-a1679494.html?hloc=at&hloc=de? Vielleicht fehlt auch eine Bibliothek oder ein Google Programm?

The first time I downloaded the data 1:1 from the other phone via USB cable. To make sure that nothing went wrong with the copying, I downloaded the data again from https://download.kurviger.de on my PC. Then unzipped and moved to the phone via USB cable. The error occurs again. Does the data from the phone help https://geizhals.de/ulefone-s8-schwarz-a1679494.html?hloc=at&hloc=de? Maybe a library or a Google program is missing?

What region’s routing data have you downloaded?

Unzipped at pc and moved the folder in phone or moved the zip in phone and unzipped there?

Where do you put the routing data, in phone’s internal storage or SD card?

Entschuldigung, vergessen die Region zu erwähnen, ich verwende germany.zip. Am PC entpackt und den Ordner auf das Telefon verschoben. Die Daten lege ich auf die SD-Karte, der interne Speicher ist nicht sehr groß.

Sorry, forgot to mention the region, I use germany.zip. Unzipped on the PC and moved the folder to the phone. I put the data on the SD card, the internal memory is not very big.

Could be that the phone because of its small memory cannot load such large graphs.
Or the sd card (or its file system) on that phone cannot handle such large routing files.

Can you try with a small graph, like berlin.zip ?
Can you try with another sd card (if available) ?

Do you have also germany.map on the sd card, is it loaded fine?

Es scheint an der Größe des Ordners bzw. der Dateien zu liegen. https://download.kurviger.de/graphs/europe/germany/berlin.zip funktioniert ohne Probleme. https://download.kurviger.de/maps/europe/germany.map liegt auch auf der SD-Karte und funktioniert ebenfalls ohne Probleme. Dann werde ich wohl das Honor weiterhin als Navigation verwenden.

It seems to be due to the size of the folder or the files. https://download.kurviger.de/graphs/europe/germany/berlin.zip works without problems. https://download.kurviger.de/maps/europe/germany.map is also on the SD card and also works without problems. Then I will probably continue to use the Honor as navigation.

Offline maps are optimized (random access & partial read), even for large maps as Germany (>2 GB).

Routing library works differently, since routing process needs to parse graph files in other ways.

Can I suggest if you want to build Germany graph with desktop Cruiser and other options?
See my instructions above, just select “Flexible mode” and “Car” in “Graph options”.
(it will take some time)

A related advice for offline maps too:

Try to use special region wide maps like Alps or DACH (Germany+Austria+Switzerland) instead of opening multiple maps. It’s better for performance.

1 Like

@luckytown can you download a different germany.zip from here and try on that device again?

The offline routing is working OK. Since my rides out of North Carolina frequently cross into other states the inability to route across borders needs solving.

Ich bzw. die Kurviger-App hat ohne Problem den modifizierten Ordner geöffnet. Route berechnen war auch möglich.

I or the Kurviger app opened the modified folder without any problems. Calculating the route was also possible.

1 Like

Hallo @devemux86,

zu erst einmal ein großes Danke :+1: :tada: :confetti_ball: :+1: für die Möglichkeit des Offline-Routing.

Habe mit den Pars Graph Daten leider auch die Probleme :pensive:

Kurviger Pro 1.12

Android 4.4.2 (API19)

Samsung GT-I9195

540x960 (240dpi)

Google location off

Mit der oben genannten Germany.zip geht es aber. Zuerst habe ich mal nur die Deutschland-Karte integriert. Da es da keine Problem gab, habe ich noch die tschechische Karte und dänische Karte hinzugefügt. Auch da lief es ohne Probleme. Es schein nicht an den Karten zu liegen, da sich auch die Dauer der Routenberechnung nicht geändert hat.

Mit Desktop-Cruiser funktioniert die andere Pars Graph Daten Germany ohne Probleme.

Aber ich habe volles Vertrauen das Ihr das mit den anderen Pars Graph Daten noch hinbekommt.

Viele Grüße

Basti

2 Likes

Thanks for the request.

Geofabrik provides OSM extracts also for larger parts of North America, so we can create graphs for those special sub regions too (Midwest, Northeast, South, West).

1 Like