grapphopper data for Crusier2.x

72 views
Skip to first unread message

km14...@gmail.com

unread,
Mar 5, 2022, 10:47:13 PM3/5/22
to Cruiser Users
No bugs or anything to report.  Cruiser2.1.2 rocks!

Just that I was finally able to
create a way to generate graphhopper graphs for the
2.x series of Cruiser. Create is not the best word. Really I'm just
grabbing stuff off the internet. While it took a few days of effort, but
that is mostly me educating myself on running .jar files
and gathering up the proper config files. Like anything
else it turns out to be easy in the end. The command line is:

java -Xmx4G -Ddw.graphhopper.datareader.file=.\src\%1.pbf -jar graphhopper-web-1.0.jar server config_v1.0.txt

Where the %1 is the pbf file I use to create the graphs. I generally run in a windows
cmd shell, but I'm finding using a bash shell with cygwin on my windows 10 laptop
is becoming more attractive. What took a while to research is getting a appropriate
"config" file. The one I am using contains only the following:

------------------------------------------------------
graphhopper:

  datareader.file: ""
  graph.location: graph-cache
  graph.flag_encoders: car

  profiles:
   - name: car
     vehicle: car  
     weighting: fastest

  profiles_ch:
   - profile: car

  profiles_lm: []

  prepare.min_network_size: 200

  routing.non_ch.max_waypoint_distance: 1000000
------------------------------------

The graph is created.
The server is started.
I then ctll-c out of the server, then move the graph
data to my phone. It all works well.

I'm still playing games with the use of sparse graphs.
(no residential or lower roads in the pbf files used to create graphs)
Combining sparse graphs with contraction hierarchies
has been an interesting game to play. May seem like an
odd thing to do but I like pushing the phone to it's limits.

So I regenerated the grapphopper graph data for the north
American continent to run in Cruiser2.x.
Can create a 7500km route in less than a second
on a $49 phone. I've got two old phones in my RV I use
for navigation. Going to update from Crusier1.11 to Crusier2.1.2
now and hit the road. One good side effect from using
sparse graphs, I know the route created is good meaning
there is no possible way is will guide me in my RV down
a foot path, a dirt road meant for 4-wheel drive or some minor
road that ends up having a locked gate.

The original "config" script also had the following:

-------------------
# Dropwizard server configuration
server:
  application_connectors:
  - type: http
    port: 8989
    # for security reasons bind to localhost
    bind_host: localhost
  request_log:
      appenders: []
  admin_connectors:
  - type: http
    port: 8990
    bind_host: localhost
# See https://www.dropwizard.io/1.3.8/docs/manual/configuration.html#logging
logging:
  appenders:
  - type: file
    time_zone: UTC
    current_log_filename: logs/graphhopper.log
    log_format: "%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"
    archive: true
    archived_log_filename_pattern: ./logs/graphhopper-%d.log.gz
    archived_file_count: 30
    never_block: true
  - type: console
    time_zone: UTC
    log_format: "%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"

---------------------

But to keep it simple, I deleted that section and the graphs still get created.

I hope all are well and remain safe. Many of you that are actively working
on creating this great set of navigation tools are located in the European
continent. I'm kind of stunned as to what is happening over there.

Emux. If you had an account I could contribute a small amount
of money to, I would. As much as I have enjoyed my travels knowing
i've got Cruiser and Osmand, I feel I should.

Kevin








Emux

unread,
Mar 6, 2022, 7:25:17 AM3/6/22
to cruise...@googlegroups.com
Thanks for the kind words!

You correctly used graphhopper-web-1.0.jar, it is available in Maven downloads.

The proper graph command line can be seen in mapsforge-creator script.

A common config is also available there for "car|turn_costs=true,foot,bike":
https://github.com/mapsforge/mapsforge-creator/blob/master/config.yml

--
Emux

km14...@gmail.com

unread,
Mar 6, 2022, 10:57:11 AM3/6/22
to Cruiser Users
Yeah. Got the jar file from maven.
Got a bookmark on that web site.
Kevin

km14...@gmail.com

unread,
Mar 6, 2022, 11:31:34 AM3/6/22
to Cruiser Users
I'll try out the config.yml file in the link you provided.
thx.
Kevin

km14...@gmail.com

unread,
Mar 13, 2022, 11:23:15 AM3/13/22
to Cruiser Users
Some thoughts on graphhopper....

I see they are up to graphhopper 5.0pre2 in there releases.
I tried generating graphs with the more recent releases
(2.0, 2.4, 3.0, 3.2, 4.0, 5.0pre2)
Seems they are not compatible with graphhopper 1.0
These releases are coming out fast and furious.
Which makes a mess for app developers.
I would suggest to just leave graphhopper 1.0  as the
official version for Cruiser for quite some time.
Kind of like what linux does with long term linux releases.
Developers like to update, but the users need stability.

And I've used graphhopper since release 0.10. Even
back then it was just fine for Cruiser. Just my opinion of course
and also I just use it for just car, truck, RV navigation. Nothing
real complicated.

I'm sure the graphhopper engineering team wanted "backward
compatiblity", but the marketing department overruled them with
"planned obsolescence". Generating revenue wins out over
customer service.

The way the "extend route" works in Cruiser, I can mix routing
short segments using Brouter and routing long segments using
graphhopper sparse graphs. This is an interesting ability. I don't
think any other navigation app can do this.
Kevin

Emux

unread,
Mar 13, 2022, 11:43:01 AM3/13/22
to cruise...@googlegroups.com
GraphHopper dropped support for offline routing and Android compatibility.
And it does not work with Android scoped storage.
https://github.com/graphhopper/graphhopper/issues/1940

Besides the graph format they also change the public API.
So it is very difficult for the app developers to support it.

--
Emux
Reply all
Reply to author
Forward
0 new messages