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

Offline Bucky Kid

  • Padavan of Locus
  • ***
  • Posts: 298
  • Thanked: 5 times
    • View Profile
Re: Offline navigation - GraphHopper - preparation
« Reply #195 on: July 25, 2017, 21:13:39 »
Updated add-on works perfectly.
Now better routing data can be created using

graph.flag_encoders=car|turn_costs=true,bike2,foot,...
graph.elevation.provider=srtm
prepare.ch.weightings=no
graph.bytesForFlags=8
 

Offline srtie4k

  • Newbie
  • *
  • Posts: 5
  • Thanked: 1 times
    • View Profile
  • Device: Moto G4
Re: Offline navigation - GraphHopper - preparation
« Reply #196 on: July 26, 2017, 15:52:21 »
Any way to get the graphhopper 0.9.0 files prepackaged as JAR's with dependencies, so I can use it in Windows to convert OSM region files?
 

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 10721
  • Thanked: 166 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: Offline navigation - GraphHopper - preparation
« Reply #197 on: July 26, 2017, 17:01:33 »
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.
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline srtie4k

  • Newbie
  • *
  • Posts: 5
  • Thanked: 1 times
    • View Profile
  • Device: Moto G4
Re: Offline navigation - GraphHopper - preparation
« Reply #198 on: July 26, 2017, 21:00:05 »
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.
 

Offline Bucky Kid

  • Padavan of Locus
  • ***
  • Posts: 298
  • Thanked: 5 times
    • View Profile
Re: Offline navigation - GraphHopper - preparation
« Reply #199 on: July 26, 2017, 21:57:32 »
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

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 10721
  • Thanked: 166 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: Offline navigation - GraphHopper - preparation
« Reply #200 on: July 27, 2017, 08:39:49 »
Hmm you are good guys!

I've just uploaded version 0.4.2 that also adds support for "hike" profile.
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 
The following users thanked this post: Bucky Kid

Offline pelsta

  • More than Newbie
  • *
  • Posts: 12
  • Thanked: 1 times
    • View Profile
  • Device: K&M Drive2
Re: Offline navigation - GraphHopper - preparation
« Reply #201 on: July 27, 2017, 10:20:41 »
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?
 

Offline Bucky Kid

  • Padavan of Locus
  • ***
  • Posts: 298
  • Thanked: 5 times
    • View Profile
Re: Offline navigation - GraphHopper - preparation
« Reply #202 on: July 27, 2017, 10:28:05 »
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).
« Last Edit: July 27, 2017, 10:33:26 by Bucky Kid »
 
The following users thanked this post: pelsta

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 10721
  • Thanked: 166 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: Offline navigation - GraphHopper - preparation
« Reply #203 on: July 27, 2017, 12:21:41 »
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.
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 
The following users thanked this post: Bucky Kid

Offline srtie4k

  • Newbie
  • *
  • Posts: 5
  • Thanked: 1 times
    • View Profile
  • Device: Moto G4
Re: Offline navigation - GraphHopper - preparation
« Reply #204 on: July 27, 2017, 18:39:31 »
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).
« Last Edit: July 27, 2017, 18:44:24 by srtie4k »
 
The following users thanked this post: pelsta

Offline poutnikl

  • Padavan of Locus
  • ***
  • Posts: 401
  • Thanked: 30 times
    • View Profile
    • My Brouter Profiles
  • Device: Xiaomi MI A1/ A8.1 / LocusMap Pro
Re: Offline navigation - GraphHopper - preparation
« Reply #205 on: July 28, 2017, 08:30:37 »
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 ?
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 Bucky Kid

  • Padavan of Locus
  • ***
  • Posts: 298
  • Thanked: 5 times
    • View Profile
Re: Offline navigation - GraphHopper - preparation
« Reply #206 on: July 28, 2017, 08:34:20 »
Quote from: poutnikl
BTW, 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
 

Offline poutnikl

  • Padavan of Locus
  • ***
  • Posts: 401
  • Thanked: 30 times
    • View Profile
    • My Brouter Profiles
  • Device: Xiaomi MI A1/ A8.1 / LocusMap Pro
Re: Offline navigation - GraphHopper - preparation
« Reply #207 on: July 28, 2017, 08:48:38 »
...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 ?
« Last Edit: July 28, 2017, 08:58:31 by poutnikl »
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 Bucky Kid

  • Padavan of Locus
  • ***
  • Posts: 298
  • Thanked: 5 times
    • View Profile
Re: Offline navigation - GraphHopper - preparation
« Reply #208 on: July 28, 2017, 09:02:28 »
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)
« Last Edit: July 28, 2017, 09:04:12 by Bucky Kid »
 

Offline poutnikl

  • Padavan of Locus
  • ***
  • Posts: 401
  • Thanked: 30 times
    • View Profile
    • My Brouter Profiles
  • Device: Xiaomi MI A1/ A8.1 / LocusMap Pro
Re: Offline navigation - GraphHopper - preparation
« Reply #209 on: July 28, 2017, 09:12:25 »
What is the reason for no elevation by default for bike ? It is an essential part of any serious bike routing.
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....  :-)