Author Topic: Offline navigation - GraphHopper - preparation  (Read 68911 times)

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 10348
  • Thanked: 109 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: Offline navigation - GraphHopper - preparation
« Reply #210 on: July 28, 2017, 09:29:24 »
Elevation is essential, agree. Currently generated data in download directory are only with "bike" profile, but latest add-on apk already support bike2, so feel free to generate own data. We regenerate them a little later, when optimal selection will be choose ( probably car|turn_costs=true,bike2,hike ).

Extra options are currently not available. Fast/short needs to be generated in files (weighting) and extra options like "no paid roads, no highways" are promised to me by Peter (one of GH developer), but not yet possible in official GH version.

Country selection is definitely limitation that needs to be solved before GH may be published, agree.
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline tigus

  • More than Newbie
  • *
  • Posts: 14
    • View Profile
Re: Offline navigation - GraphHopper - preparation
« Reply #211 on: July 28, 2017, 12:07:53 »
I think the limitation of the country selection is compensated by the possibility of generating the data based on a pbf file. In addition, it allows to have the updated data.
Greetings.
 

Offline srtie4k

  • Newbie
  • *
  • Posts: 5
  • Thanked: 1 times
    • View Profile
  • Device: Moto G4
Re: Offline navigation - GraphHopper - preparation
« Reply #212 on: July 28, 2017, 13:43:21 »
Is there a limitation on "country file" size? I built the entire US as a routing file and tried it in Locus (it was 3.5GB) and it immediately crashed on opening the navigation screen.
 

Offline poutnikl

  • Padavan of Locus
  • ***
  • Posts: 391
  • Thanked: 29 times
    • View Profile
    • My Brouter Profiles
  • Device: Xiaomi MI A1/ A7.1.2 (<-Sony Xperia M DUAL) / LocusMap Pro
Re: Offline navigation - GraphHopper - preparation
« Reply #213 on: July 28, 2017, 14:00:08 »
I think the limitation of the country selection is compensated by the possibility of generating the data based on a pbf file. In addition, it allows to have the updated data.
Greetings.
Yes, e.g. here  http://extract.bbbike.org/ one can let generated a custom area in PBF format.
https://github.com/poutnikl/Brouter-profiles/wiki
When a user digs profiles up from the GitHub repositories,
they will be hopefully wrapped in some wiki knowledge....  :-)
 

Offline poutnikl

  • Padavan of Locus
  • ***
  • Posts: 391
  • Thanked: 29 times
    • View Profile
    • My Brouter Profiles
  • Device: Xiaomi MI A1/ A7.1.2 (<-Sony Xperia M DUAL) / LocusMap Pro
Re: Offline navigation - GraphHopper - preparation
« Reply #214 on: July 28, 2017, 14:10:15 »
Is there a limitation on "country file" size? I built the entire US as a routing file and tried it in Locus (it was 3.5GB) and it immediately crashed on opening the navigation screen.
I can imagine the  device dependent  resources demand may depend of the file size, and 3.5 GB may be too brave attempt. I would personally divide the US into several overlapping areas.
Or, I would create a custom area along supposed route, if it is for one time occasion.
https://github.com/poutnikl/Brouter-profiles/wiki
When a user digs profiles up from the GitHub repositories,
they will be hopefully wrapped in some wiki knowledge....  :-)
 

Offline srtie4k

  • Newbie
  • *
  • Posts: 5
  • Thanked: 1 times
    • View Profile
  • Device: Moto G4
Re: Offline navigation - GraphHopper - preparation
« Reply #215 on: July 28, 2017, 14:42:15 »
I ended up falling back to the Geofabrik "region" files for the US, i.e. Northeast, South, Midwest, West, Pacific (and Canada), biggest of which is ~1.3GB. That seems to work mostly, although sometimes Locus still crashes, sometimes I get "service not available" or some such error even when correct region file is selected for start/end location.

One other oddity I noticed is that Graphhopper lists region files in some arbitrary order, seemingly the order in which they were copied to the SD card, rather than alphabetical.

I'm keeping BRouter as a backup, Graphhopper is still a bit buggy.
« Last Edit: July 28, 2017, 14:44:44 by srtie4k »
 

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 10348
  • Thanked: 109 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: Offline navigation - GraphHopper - preparation
« Reply #216 on: July 28, 2017, 22:30:28 »
Hmm these errors happen to you only with such huge files or also with smaller files? If you find a while, try it please. If same problem happen only with huge files, I may try to simulate same problem on own device and report these errors to developers of GraphHopper.

Order of files in add-on settings is on my head ... I'll look at it, thanks.
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 
The following users thanked this post: srtie4k

Offline tigus

  • More than Newbie
  • *
  • Posts: 14
    • View Profile
Re: Offline navigation - GraphHopper - preparation
« Reply #217 on: September 18, 2017, 20:07:46 »
Hello, I wanted to see if anyone has generated their data for GraphHopper based on a PBF file.
I have several doubts:
1. What are the profiles that the GraphHopper Locus plugin handles? At the icon level there are 3, apparently car | bike | foot. This limits the profiles to indicate in the config.properties file in the graph.flag_encoders attribute.
2. Why does the plugin handle only 3 profiles and GraphHopper online allows more?
3. I tried to generate with the bike2 profile (graph.flag_encoders = car|turn_costs = true,bike2,hike) and also with the hike and foot profiles, both (graph.flag_encoders = car|turn_costs = true,bike,hike,foot ) ... but it gives an error. To solve the error, the same generator recommends adding in the configuration graph.bytes_for_flags=8. This allows to generate the files successfully ... but ... these files are not usable by the plugin. When I want to use the files generated with this option (graph.bytes_for_flags=8), the plugin gives error. You can not get the point 0 ... you can not get the point1. It only works by generating files with profiles that do not require adding this option, ie with the combination car,bike,hike or car,bike,foot.
Greetings.
 

Offline silvermapper

  • More than Newbie
  • *
  • Posts: 71
  • Thanked: 1 times
    • View Profile
  • Device: Motorola G 4G
Re: Offline navigation - GraphHopper - preparation
« Reply #218 on: December 12, 2017, 19:09:36 »
I continue to create GraphHopper routing files using the 0.2.0 data generator provided by Menion, and a .pbf file from http://download.geofabrik.de/europe.html.  I wish to move on.  I see where to download the latest GraphHopper .apk file as described here: http://forum.locusmap.eu/index.php?topic=4036.0 but not a later generator.  Is there nothing later than here: https://drive.google.com/drive/folders/0B7v_sPhHE6RgOUtXajZHVk9BSVU ?
 

Offline pelsta

  • More than Newbie
  • *
  • Posts: 12
  • Thanked: 1 times
    • View Profile
  • Device: K&M Drive2
Re: Offline navigation - GraphHopper - preparation
« Reply #219 on: December 13, 2017, 09:30:39 »
Here's my way to create a generator under Windows 7 (in Polish)

Compiling graphhopper-tools-VERSION-jar-with-dependencies.jar

1. Zainstalować JDK (wymagane przez Apache Maven)
http://www.oracle.com/technetwork/java/javase/downloads/index.html

2. Pobrać źródła wybranej wersji (np 0.9) graphhopper z repozytorium (zielony przycisk "Clone or download")
https://github.com/graphhopper/graphhopper/tree/0.9

3. Rozpakować zip do jakiegoś katalogu np, graphhopper\

4. W tym katalogu utworzyć podkatalog maven\

5. Pobrać Apache Maven
https://maven.apache.org/download.cgi

6. Zawartość zip rozpakować do tego podkatalogu maven\
(zdaje się, że Maven zostanie ściągniety i zainstalowany gdy go nie będzie na dysku)

7. Pobrać Cygwin (wybrałem wersję 64 bit) i zainstalować (domyślnie w C:\cygwin64\) (po domyślnej instalacji chyba doinstalowałem jeszcze grep, unzip i wget)

8. W katalog graphhopper\ utworzyć plik start.bat o zawartości:

Code: [Select]
path=C:\cygwin64\bin\;D:\graphhopper\maven\bin\
set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_144\
C:\cygwin64\bin\sh graphhopper.sh build
pause
i uruchomić go.

Zostanie utworzony plik D:\graphhopper\tools\target\graphhopper-tools-0.9.0-jar-with-dependencies.jar, który wystarczy do generowania danych nawigacji dla Graphhopper (w środowksku JDK albo JRE).
 

Offline uatschitchun

  • More than Newbie
  • *
  • Posts: 30
    • View Profile
Re: Offline navigation - GraphHopper - preparation
« Reply #220 on: December 13, 2017, 09:53:55 »
Hi there.

Did a short test. Installed apk from first post and routing data fitting to my used map (germany north). A test navigation did succeed.

So my question is, what's the advantage to BRouter? Is it planned to provide updated locus maps from store with routing data included, so no extra router and routing files are needed?
What I do not understand is, there are routing enabled maps already available, so why do we need these routing files?
Maybe these are noob questions, but a little more background info in first post would be enlightening :-)
 

Offline john_percy

  • Padavan of Locus
  • ***
  • Posts: 438
  • Thanked: 30 times
    • View Profile
  • Device: MotoG
Re: Offline navigation - GraphHopper - preparation
« Reply #221 on: December 16, 2017, 00:08:24 »
Others may be able to give a better answer but my understanding is that BRouter is designed as a bicycle routing app (hence the name) and works OK for hiking. Although poutniki has written vehicle profiles, it is still said to have flaws if used for vehicle routing. It seems quite reasonable to me however.
GraphHopper has a better approach to vehicle routing but cannot route across map boundaries.
The OSM map data has all the information required for routing, just not arranged in a way that is suitable for working out routes in real time. There's a lot of irrelevant information included, for a start (like the location of public toilets) which would just overload memory and slow down the process. The connections between road segments need to be analysed and databased in order to allow efficient computation. The "graphs" produced for GraphHopper are just this data extracted from the OSM information. BRouter data is already processed (hurrah) and downloadable as large tiles.
The user experience with offline GraphHopper is not good because of the need to generate routing data oneself. BRouter is better in that respect but still requires the routing data to be specifically downloaded. Both have the great advantage over online options of allowing routing where there is no mobile signal available.
Personally I use Google maps for online routing, MapFactor Navigator for offline car routing when necessary, Locus and BRouter for hiking routing. Mainly I just use Locus with offline maps for displaying and following routes on the ground.
I may have some of this wrong, and others may improve on this answer.



Sent from my XT1039 using Tapatalk