Offline navigation - GraphHopper - preparation

Started by Menion, July 16, 2014, 20:43:19

0 Members and 7 Guests are viewing this topic.

srtie4k

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.
  •  

poutnikl

Quote from: tigus 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.
Yes, e.g. here  http://extract.bbbike.org/ one can let generated a custom area in PBF format.

poutnikl

Quote from: srtie4k 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.
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.

srtie4k

#213
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.
  •  

Menion

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.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  
    The following users thanked this post: srtie4k

tigus

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.
  •  

silvermapper

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 ?
  •  

pelsta

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:

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).
  •  

uatschitchun

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 :-)
  •  

john_percy

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

Voluntary and Velocity themes - https://voluntary.nichesite.org
  •  

Bucky Kid

With silent update from 18/02/2018 on github, Locus plugin is no more compatible with generated routing data. Can anybody confirm or mistake on my side? I build the sources using latest JDK and Maven.
The engine is still 0.10-SNAPSHOT but not working with plugin 0.4.2 anymore.
  •  

TrulloF

I can confirm, that newer graphhopper nightlies are not compatible with the Locus plugin (wrong version number of generated routing data) even though it's still the same graphhopper version (0.10-SNAPSHOT). I would really appreciate, if Menion could fix that.
Alternative routes, which are possible now with graphhopper, would be also nice, if they could be implemented into Locus (it's working mighty fine with cruiser on my desktop).
Route calculations on my desktop are near instant with cruiser, but the Locus plugin always took ages. Any idea why?
  •  

Menion

You guys are building own APK add-on? Is current project on GitHub works without problem for you? Better asking: is a current structure on GitHub clear and easily re-usable now? I made some changes in structure to make it simply work as a separate project.
And the issue, right, I see this problem as well, something about incompatible "foot" parameter. I'll look at it, thanks"

EDIT: Trullo ... speed compare .. it is necessary to compare Android and Android, so e. g. Cruiser on Android and not on the desktop. Differences are too huge here and mobile processors are far from being so powerful as on the desktop.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Bucky Kid

#223
Hello menion,
Quote from: menion on February 24, 2018, 11:16:02
You guys are building own APK add-on? Is current project on GitHub works without problem for you? Better asking: is a current structure on GitHub clear and easily re-usable now?
the answer is no and no (see previous post by me). Current nightly updates can be (or not) preparation for 0.11 snapshot, anyway current gH sources generate routing data not compatible with latest official plugin. But it may be good to wait for next stable snapshot (as there may be more compatibility changes)

Here's latest data for test:
https://drive.google.com/open?id=1rwnMx3RlRIdMZKGbOExtj4dR85MOt4ti
  •  

TrulloF

No, we are not talking about creating own plugins, but generating routing data for the Locus plugin with latest gH builds, which still share the same version number, but aren't compatible anymore since a few gH builds (graphhopper-web).
Anyway, I'm using brouter most of the time, as it's usually faster and not limited to just one country.
  •