Offline navigation - GraphHopper - preparation

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

0 Members and 5 Guests are viewing this topic.

Menion

Hello,
you cannot run GraphHopper directly in Windows, you need either running linux or some 3rd party unix environment like Cygwin. I've found something more about it here: https://github.com/graphhopper/graphhopper/blob/master/docs/core/windows-setup.md , so hope it will be useful for you.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

srtie4k

Actually after using graphhopper.sh on a Ubuntu VM, the JARs were compiled and I was able to export the whole graphhopper folder to my Windows machine, and used the batch file script posted on the previous page.

Next question is would it be possible to import the entirety of North America? Or is the file size just simply too big? The NA PBF file is ~7.8GB, not sure how big the final "imported" region would end up being.
  •  

Bucky Kid

Yes it works, updated Windows bat with precompiled targets:
https://drive.google.com/file/d/0By0QjFcdxojodzA3Z3hoV3ZNaVk

The pbf size has no hard limitation except RAM and disk space so just try how big data it's able to compile
  •  
    The following users thanked this post: pelsta

Menion

Hmm you are good guys!

I've just uploaded version 0.4.2 that also adds support for "hike" profile.
- 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: Bucky Kid

pelsta

Quote from: Bucky Kid on July 26, 2017, 21:57:32
Yes it works, updated Windows bat with precompiled targets:
https://drive.google.com/file/d/0By0QjFcdxojodzA3Z3hoV3ZNaVk

Thank you very much, @Bucky Kid!

All you need to generate routing data for GraphHopper is this:
GraphHopper.bat, config.properties, graphhopper-tools-0.10-SNAPSHOT-jar-with-dependencies.jar and, of course, the .pbf file.

How can I generate graphhopper-tools-VERSION-jar-with-dependencies.jar file myself?
  •  

Bucky Kid

#200
Quote from: pelsta on July 27, 2017, 10:20:41
How can I generate graphhopper-tools-VERSION-jar-with-dependencies.jar file myself?

If you mean on Windows, you need Maven (extract to gH dir and rename apache-maven-3.5.0 to maven) and Cygwin/MinGW to run the shell script. Then launch bash graphopper.sh build (on Linux run only the shell command)

@menion: hike works. Is there a complete list of profiles?
A small bug in UI - when switching between profiles in config dialog, compute command checkbox disappears (and compute command option is always reset).
  •  
    The following users thanked this post: pelsta

Menion

Not sure if it will be visible from code to you, it's anyway here: https://github.com/asamm/locus-addon-graphhopper/blob/master/src/main/java/com/asamm/locus/addon/graphhopper/RoutingService.java#L72 . I see that code on GitHub has also some wrong intent so it looks really confusing :).

Problem in UI will be fixed in next Locus Map version, I noticed this as well, 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: Bucky Kid

srtie4k

#202
Quote from: pelsta on July 27, 2017, 10:20:41
Quote from: Bucky Kid on July 26, 2017, 21:57:32
Yes it works, updated Windows bat with precompiled targets:
https://drive.google.com/file/d/0By0QjFcdxojodzA3Z3hoV3ZNaVk

Thank you very much, @Bucky Kid!

All you need to generate routing data for GraphHopper is this:
GraphHopper.bat, config.properties, graphhopper-tools-0.10-SNAPSHOT-jar-with-dependencies.jar and, of course, the .pbf file.

How can I generate graphhopper-tools-VERSION-jar-with-dependencies.jar file myself?

You can also build a Ubuntu VM (and install Java, aka "sudo apt-get install default-jdk"), copy the graphhopper source over and build a small set of routing data with "graphhopper.sh import xxx" this will compile the JAR files automatically before importing, which you can then copy the project to your Windows PC.

BTW I would recommend adding parameters "-Xms512m -Xmx12g " to JAVA_OPT in the BAT file. "-XmsYYYm" is the starting memory allocation where YYY is your memory in "m" (megs), and -XmxZZZg is the maximum memory allocation where ZZZ is your memory in g (gigs), especially if you plan on building routing files larger than 1GB in size (as JVM defaults to 1GB or 75% of memory on Windows).
  •  
    The following users thanked this post: pelsta

poutnikl

Do I get it right there are no routing options in default GH instalation for car/bike/foot transportation modes for now ? ( Not even fast/short or like that).

At least I cannot see how to get any. If I try to invoke Settings-like icon in the Navigation dialog ( No limitation legend), it just brings me to the addon settings for choosing the country file.

( LM Pro 3.24.3, addon v0.42, GH v 0.9)

BTW, is there any use for the end user the file config.properties ? Or is it just configuration for data generator ?

Bucky Kid

Quote from: poutniklBTW, is there any use for the end user the file config.properties ? Or is it just configuration for data generator ?
Yes, only for data generator.

You get the profiles options in navigation dialogue.

_____________________
Sent from my phone using Tapatalk
  •  

poutnikl

#205
Quote from: Bucky Kid on July 28, 2017, 08:34:20
...You get the profiles options in navigation dialogue.

Hmm, the main reason for my asking was that I do not get them. The options icon ( that with 3 sliders ) brings me to the GH Addon settings, where is just option to select the country file. Note that I do not mean the selection of transportation mode, it is there. But nothing else to choose, with no idea what the profile is like.

Edit: E.g. for car navigations with tollroad ON/OFF.  Is supposed to have such settings hard coded to the country data file, like Car-tollroad and Car-tollfree and to have 2 such transportation modes in the dialog.?  Or to have 2 country data files generated, one with toll ON and the other toll OFF ?

Bucky Kid

#206
Yes the three slider options offer only country selection. The transportation profiles have no adjustments. Can be a bit tuned at data generation time (now only turn costs for car and elevation data use for bike).

I think the country selection could be removed in future versions and autoselect the right data set for computed segment, because the country selection is limitation now (no cross-country routing)
  •  

poutnikl

What is the reason for no elevation by default for bike ? It is an essential part of any serious bike routing.

Menion

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

tigus

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