Locus Map - forum

Development => Other features => Navigation & Guidance => Topic started by: Menion on July 16, 2014, 20:43:19

Title: Offline navigation - GraphHopper - preparation
Post by: Menion on July 16, 2014, 20:43:19
Hi guys,

Quote
Because of recent progress in GraphHopper service (https://github.com/graphhopper/graphhopper/issues/1940), work on this add-on on our side was terminated.



Latest version of Locus GraphHopper add-on: v0.10

Requirements: Locus Map 3.9.3.3+

Download the APK file from HERE (https://github.com/asamm/locus-addon-graphhopper/releases/latest). Copy the apk file to your device and install.

Download Routing files from HERE (https://graphhopper.develar.org/#maps), based on your country. Suggest to tap on Locus button directly in your device web browser!

Start Locus and set GraphHopper as default routing service.
http://docs.locusmap.eu/doku.php?id=manual:user_guide:functions:navigation:settings#navigation_data_sources

In the GraphHopper Add-on choose which file you want to use. Do this in settings button on right side of previous settings.




How to generate routing files
- Download the raw openstreetmap file (pbf files)
- Execute ./graphhopper.sh import <your-osm-file>. This creates the routing data

Recommended generator parameters
graph.flag_encoders: bike2,racingbike,mtb,hike
graph.bytes_for_flags: 8
graph.elevation.provider: cgiar


add `car|turn_costs=true` if need car routing

Title: Re: Offline navigation - GraphHopper - preparation
Post by: gynta on July 30, 2014, 11:17:49
nice - 2 years ago we talk about graphHopper.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on July 30, 2014, 11:30:40
2 years ... nice :)

There were three blocking factors
1. GraphHopper developer wasn't sure what he wants
2. GH developer had not much time on this project
3. no way to provide data to users

And situation now
1. GraphHopper developer work on this project on full time
2. He still don't have a time, so I decided to make add-on as own project
3. we have store to distribute routing data now

So here it is, working offline routing together with actions (not jsut plain track without navigation).

There is still missing a few features (like roundabouts), but I already ride around 300 km by car and 200 by bike with it and it works ;)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: tramp20 on July 30, 2014, 15:41:27
I did all what menion wroteDownloaded zip files place into Locus/graphHopper directory (extracted). In add-on choose which file you want to use. That's all

But after selecting the map in the add-on I get not the additional GraphHopper in Navigation/Quelle zur Routenberechnung.
The list has only the first 4 entries :-(

edit
The pro version seems to be too old :-)
The test version shows it now.

But at the first glance I do not know how to proceed, I am really to old for new things.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on July 30, 2014, 15:45:39
Yes you need Test version. Current Pro version do not know this new mechanism.

And too old :) ... just in settings choose GraphHopper, choose in GraphHopper settings which data source you want to use and then start navigaion in Locus like usually. Function "Navigate to", or for testing at home is best "Add new route" (button 5 - http://docs.locusmap.eu/doku.php?id=manual:functions:add_new_route_measure#compute_route_no_5 )
Title: Re: Offline navigation - GraphHopper - preparation
Post by: tramp20 on July 30, 2014, 16:31:55
Thank you,  I will this tomorrow.


Gesendet von meinem D5503

Title: Re: Offline navigation - GraphHopper - preparation
Post by: Čelda on July 30, 2014, 16:34:58
Quote from: menion on July 16, 2014, 20:43:19
Warning: required Android 4.0+

:'(

What is this determined by ?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Christian on July 30, 2014, 16:57:04
Quote from: menion on July 30, 2014, 15:45:39
Yes you need Test version.

Hi menion, would you please edit and insert this quote into your first post? Otherwise more old people like tramp and me will try to run the add-on on the wrong version of Locus.
Thanx,
Christian
Title: Re: Offline navigation - GraphHopper - preparation
Post by: gynta on July 30, 2014, 17:59:05
can't change routing data.
see clip

edit
have to restart locus after change...
Title: Re: Offline navigation - GraphHopper - preparation
Post by: ta-ka on July 30, 2014, 18:14:03
Could you provide routing data for Japan?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on July 30, 2014, 18:47:05
@gynta: thanks, I have idea why this happen, so I'll fix it

@christian, tramp: oki added

@ta-ka: for you, almost everything ;). Give me a day

@čelda: why Android 4.0+? Because of memory limits on old devices.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: jusc on July 30, 2014, 20:28:29
Quote from: gynta on July 30, 2014, 17:59:05
can't change routing data.
see clip

edit
have to restart locus after change...
Did you delete first point? It seems that GrassHopper does not route outside the choosen area.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: gynta on July 30, 2014, 20:30:16
jusc, see clip.
i start a new nav. after breaking first routing.
...but I think Menion has already found the problem.


edit
btw.
graphHopper hates motorways ;)
(http://s24.postimg.org/7xnrqy4ox/2014_07_30_223640.jpg) (http://postimg.org/image/7xnrqy4ox/)
(yes i selected car modus)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: tramp20 on July 31, 2014, 07:24:40
I cannot change between Auto, Rad and zu Fuß.
Always car mode is selected.

But the new procedure to navigate looks good and is (for me) simple enough :-)

Title: Re: Offline navigation - GraphHopper - preparation
Post by: gynta on July 31, 2014, 09:27:19
Quote from: tramp20 on July 31, 2014, 07:24:40
I cannot change between car, cycle and foot. Always car mode is selected.
"selected" ? means you notice that only from the result?
hmm maybe my problem (above) has the same cause - I thought I had chosen "car" - but it's "foot" or "cycle".
Possible?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on July 31, 2014, 11:07:49
I'm testing it also, and every parameters go to add-on (and GraphHopper API) correctly. Anyway I also get something not precise results for bike/foot. Suggest to test it on some short path where is clear what is car and what is bike. I'm sure you will see that parameter work and that just GraphHopper gives too low priority to bike paths.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: tramp20 on July 31, 2014, 12:50:49
Quote from: menion on July 31, 2014, 11:07:49
Suggest to test it on some short path where is clear what is car and what is bike. I'm sure you will see that parameter work and that just GraphHopper gives too low priority to bike paths.

If I select bike or foot then always I hear "car mode" and I get a route over auto streets even there are definitively bike or hike paths.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: jusc on July 31, 2014, 13:04:44
Quote from: tramp20 on July 31, 2014, 12:50:49
If I select bike or foot then always I hear "car mode" and I get a route over auto streets even there are definitively bike or hike paths.

That is a GraphHopper problem... I think development isn´t really finished. On the other side, the navigation starts always with car navigation (voice) as far as I know. It doesn´t depend of used navigation source.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: gynta on July 31, 2014, 13:26:40
@menion
attached 2 points
try car mode (from south to north)
graphHopper ignores highway

edit
i think graphHopper use "SHORT car" instead of "FAST car"

btw.
http://graphhopper.com/#usecases
GPSies, Komoot,... and Locus  ;)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: tramp20 on July 31, 2014, 14:07:17
If I try the three routes (car. bike, hike) on their web page http://graphhopper.com/maps I always get the correct different routes.

So for me the addon is not really ready.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: gynta on July 31, 2014, 14:32:32
Quote from: tramp20 on July 31, 2014, 14:07:17
If I try the three routes (car. bike, hike) on their web page http://graphhopper.com/maps I always get the correct different routes.
Good point - my route are also ok with this online service.

Don't know if we have same problems tramp.
Would you share your start/end point plz.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: tramp20 on July 31, 2014, 14:43:41
Quote from: gynta on July 31, 2014, 14:32:32

Would you share your start/end point plz.

Start 47.781962,12.131824
End  47.749914,12.135172

Online route planner http://graphhopper.com/maps/?point=47.781962%2C12.131824&point=47.749914%2C12.135172

The biggest part is a cycle track on the Inn dike.
You can simply change car/bike/hike and you see the different routes. The Locus addon shows always the car route.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on July 31, 2014, 14:45:27
same here. Hmm it won't be a problem with add-on itself, but more with routing files I generate. I'll try to generate them with different parameters and let you know.

Btw. tramp - "So for me the addon is not really ready." - that's why add-on is just here on forum :)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: tramp20 on July 31, 2014, 14:49:18
Quote from: menion on July 31, 2014, 14:45:27

Btw. tramp - "So for me the addon is not really ready." - that's why add-on is just here on forum :)

I know: never trust a program < v1.x :-)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on July 31, 2014, 15:33:19
Version 0.1.1

Interesting, I've just added possibility to choose between car fast/short and bike fast/short and seems that this extra parameter (short, fast) helps also on cycle roads. Give it a try ;)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Bucky Kid on July 31, 2014, 17:07:55
Hi, how comes graphHoper routing compared to MapQuest and Brouter as for computed route quality and relevnce? Which data provider GH uses?
Did somebody perform more exhaustive tests?
I like that routing data are much smaller than for Brouter for the same area.
I have featire reqquest for highways and paid roads exclusion if supported by GH
Thanks for new offline routing service  :)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: jusc on July 31, 2014, 20:16:14
At this moment I've compared GH 0.1.1 with BRouter for shortest way.
1:0 for BRouter
Title: Re: Offline navigation - GraphHopper - preparation
Post by: gynta on July 31, 2014, 21:27:28
Quote from: tramp20 on July 31, 2014, 14:43:41
Quote from: gynta on July 31, 2014, 14:32:32
Would you share your start/end point plz.
Start 47.781962,12.131824
End  47.749914,12.135172
thx for sharing
here are the results:
https://www.dropbox.com/s/065f8s5a9igef6s/clip0186x.avi
Title: Re: Offline navigation - GraphHopper - preparation
Post by: tramp20 on August 01, 2014, 05:28:14
Quote from: gynta on July 31, 2014, 21:27:28

here are the results:

Thank you, but only the car route is correct.
The other ones are partially on small streets even a official bike and foot path are in the neighborhood within 50 m.
You can see the correct routes on the graphhopper website with my examples.

Now I have no time to test because the weather is perfect to make a MTB tour :-)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Christian on August 01, 2014, 06:08:46
Enjoy!
Title: Re: Offline navigation - GraphHopper - preparation
Post by: balloni55 on August 01, 2014, 08:01:48
Thank you for nice new addon ;)
little problem:
i copy a route and stored it with "change track orientation" and used it backwards,
arrows on map are ok :)
but navigation instruction arrow and voice are mirrored 180°, only in roundabouts it fit but this is clear in both directions instruction is "right"

(http://s9.postimg.org/gxcr61cq3/Graf.jpg) (http://postimg.org/image/gxcr61cq3/)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on August 01, 2014, 10:53:18
ah it's general problem with new reversion of track ... thanks, I'll fix it
Title: Re: Offline navigation - GraphHopper - preparation
Post by: tramp20 on August 01, 2014, 13:53:56
Hi menion,
it looks good and seems simple enough even for me :-)

A little discrepancy:
On my smartphone I see this picture with "car fast, car short, bike, foot".
(http://s23.postimg.org/4bsh49zxz/Screenshot_2014_08_01_13_48_17.jpg) (http://postimg.org/image/4bsh49zxz/)

On Bluestacks I see instead  "car fast, car short, bike fast, bike short, foot".

Both have the same Locus Test and graphHopper versions.

Title: Re: Offline navigation - GraphHopper - preparation
Post by: gynta on August 01, 2014, 14:37:19
Quote from: tramp20 on August 01, 2014, 13:53:56
On my smartphone I see ...
On Bluestacks I see instead ...
Both have the same Locus Test and graphHopper versions.
hm, works here on smartphone (5 options)

edit
...look on bottom of your screenshot  8)
(http://s30.postimg.org/rre5po3lp/Screenshot_2014_08_01_13_48_17.jpg) (http://postimg.org/image/rre5po3lp/)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on August 01, 2014, 14:58:54
 ;D
Title: Re: Offline navigation - GraphHopper - preparation
Post by: tramp20 on August 01, 2014, 15:22:19
Quote from: gynta on August 01, 2014, 14:37:19

hm, works here on smartphone (5 options)

...look on bottom of your screenshot  8)


Yes, I see it now. On Bluestacks I see Powered by GraphHopper API,
On my smartphone I have made the same configuration: \graphhopper directory is in storage\sdcard0\locus (not on the external SD), I have selected bayern.osm in the graphhopper.apk v0.1.1

Even after a de- and re-installation of the app I see MapQuest :-(
Perhaps the graphhopper.apk has a problem with internal SD cards?
On Bluestacks I have only one SD.


Edit: I found it in the sources of routing calculation :-)

Title: Re: Offline navigation - GraphHopper - preparation
Post by: gynta on August 01, 2014, 17:22:15
Quote from: menion on July 31, 2014, 15:33:19
Version 0.1.1
Interesting, I've just added possibility to choose between car fast/short and bike fast/short and seems that this extra parameter (short, fast) helps also on cycle roads. Give it a try ;)

next test: better - much better
brouter vs graphHopper
installation: 0:1
calculation time 0:1
configurable: 1:0
best result: ?:?  because testing is in process - but that is the killer point  :)
(http://s13.postimg.org/pf0fdqw37/2014_08_01_171954.jpg) (http://postimg.org/image/pf0fdqw37/)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: ta-ka on August 02, 2014, 05:07:11
Thank you for preparing routing data for whole the world.
I've briefly confirmed routing in Japan works and I'll try further test.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on August 09, 2014, 18:12:24
sure, you're welcome. Seems only problem is whole germany due to memory requirements (16 GB RAM isn't enough). So maybe later ...

I've also spend few days on bike and in car just with this kind of routing and it works perfectly. Better then I expect :)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: gawalione on August 10, 2014, 21:05:22
You could write a mail to moenk (admin of geoclub.de). Here he writes that he has a machine with 64gb and 16 cores: http://forum.geoclub.de/viewtopic.php?f=174&t=74965#p1183811
Perhaps he is willing to help out with this.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on August 10, 2014, 21:17:59
thanks for offer, anyway for now, whole germany is quite useless. Distances over 100 - 200km take really long and in case of huge countries may very fastly ends on memory limit (so whole add-on crash).

Because this is still ALPHA version, I think it's not important now
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Joachim Buhl on August 16, 2014, 17:22:37
Hi All

I'm playing around a little bit with GH. Not bad I think.
Sometimes Iit lags similar to MapQuest when you create a route within Locus step by step, that you get an error despite the path to follow is simple to find. I think some nodes in the map data are not correct and so GH and MapQuest and others cannot route.

What is about my wishes 1 to 3 from that thread?
http://forum.locusmap.eu/index.php?topic=3318.msg28908#msg28908

Especially point 3: It is possible to reroute an existing GPX track with GH?

Thanks

Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on August 17, 2014, 21:04:11
hi,

your points 1. - 3. are not related directly to this add-on, but generally to navigation system in Locus. Currently I have other priorities then navigation, sorry.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Paul Keizer on September 27, 2014, 11:27:52
Hi,

A few weeks ago I first tried GH. I downloaded Netherlands and Belgium.  Worked well.
Last week I transferred Locus to SD-card.
And this morning I downloaded GH France.
And I tried tot navigate in France. No go!
Back to GH Add-in, to select France. Seems to work. But not the navigation.
Back tot the GH add-in. He, it is still on Belgium. Select France again.
Leave add-in, and start it up again. Hé, Still Belgium is selected.
Try to select Netherlands (worked, a few weeks ago). Leave add-inn and start again. Still Belgium.

Ergo: Selecting an other country does not work anymore. Has it to do with the Locus transfer to SD-card? What can I do?

Thanks!
Paul.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on September 29, 2014, 11:36:36
hmm interesting, I was 100% sure it worked :)

So please try new version 0.1.2. Thanks
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Sersus on October 14, 2014, 09:57:50
Very nice addon but almost useless for bikers and hikers in Moscow (Russia). The coverage of "moskva-gh.zip" is too small and it is covers only the nearest suburbs of city. While the townspeople are biking, hiking and also have summer residences far beyond nearest suburbs. So I would like to ask you to expand the routing coverage four times or even five times wider!

P.S. By the way. The same applies to vector map of Moscow in Locus store. It is useless because of small coverage. Please do it more wider too!
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on October 14, 2014, 12:18:04
Hello Sersus,

with vector maps, I don't see a problem. Locus has auto-loading feature (in settings > maps - advanced), so vector maps should be correctly auto-loaded when needed.

With GraphHopper is one major problem. Currently it do not allow to compute route over more files at once. This is, next to few other issues, one reason why it cannot be now a public add-on and still remain in Beta.

So for now, it's not possible to make these areas bigger, because we improved our generator for Vector maps, so for same areas as vector maps are also generate areas for a GraphHopper.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: jusc on February 23, 2015, 13:16:59
How can I see if the Locus GraphHopper routing files are up to date?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: gynta on February 23, 2015, 13:33:25
QuoteRouting data are here (http://goo.gl/gqKV6j)
think the folder name (20140722) is last update time...
Title: Re: Offline navigation - GraphHopper - preparation
Post by: jusc on February 23, 2015, 14:06:38
Danke,
watt´n da los? Die Datei ist 660mb groß, und letztendlich in 1 Minute auf´m Rechner gewesen  ;D ;D
Puh :o , but it took only 1 minute to download the file. 

(http://s10.postimg.org/mchuju7d1/What.jpg) (http://postimg.org/image/mchuju7d1/)

But are the routing files from last July not outdated?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: jusc on February 28, 2015, 16:47:10
Is this https://drive.google.com/folderview?id=0B3W5Lc1CHcKobWxWVXliSHRFRG8&usp=sharing the only soruce of routing files for GraphHopper?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on February 28, 2015, 17:34:47
jup, probably. I had no time to generate a new routing files. Is there interest in fresh data?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: gynta on February 28, 2015, 19:00:37
the question is: why not?  ;D
Title: Re: Offline navigation - GraphHopper - preparation
Post by: tommi on February 28, 2015, 21:30:24
There is definitely interest as it is the only offline routing possibility in Locus.
Will there also be an update of the GrapHopper routing engine?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Christian on February 28, 2015, 21:46:39
Quote from: tommi on February 28, 2015, 21:30:24
... it is the only offline routing possibility in Locus.
Hu?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Andrew Heard on March 01, 2015, 00:04:02
Quote from: Christian on February 28, 2015, 21:46:39
Quote from: tommi on February 28, 2015, 21:30:24
... it is the only offline routing possibility in Locus.
Hu?
How about BRouter - latest update 19th Feb. Latest GraphHopper data 8th Jan.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: tommi on March 01, 2015, 05:18:53
Quote from: Christian on February 28, 2015, 21:46:39
Quote from: tommi on February 28, 2015, 21:30:24
... it is the only offline routing possibility in Locus.
Hu?
Sorry, I wan't precise enough. Of course I know BRouter.
GraphHopper is the only offline solution for Locus which provides navigation orders based on streets/ways. BRouter "simply" provides the naked track.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Andrew Heard on March 01, 2015, 10:01:51
Thanks for that tommi - I was completely unaware of the difference - interesting.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: jusc on March 01, 2015, 11:47:00
Quote from: Andrew Heard on March 01, 2015, 00:04:02
How about BRouter - latest update 19th Feb. Latest GraphHopper data 8th Jan.

Hi Andrew,
where did you find the latest GraphHopper?

Thanks in advance.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: gynta on March 01, 2015, 13:08:47
Quote...Latest GraphHopper data 8th Jan.
...but we only can use the given files.
-> http://forum.locusmap.eu/index.php?topic=4036.msg30868#msg30868
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Andrew Heard on March 04, 2015, 23:28:12
Quote from: Paul Keizer on September 27, 2014, 11:27:52
Hi,

A few weeks ago I first tried GH. I downloaded Netherlands and Belgium.  Worked well.
Last week I transferred Locus to SD-card.
And this morning I downloaded GH France.
And I tried tot navigate in France. No go!
Back to GH Add-in, to select France. Seems to work. But not the navigation.
Back tot the GH add-in. He, it is still on Belgium. Select France again.
Leave add-in, and start it up again. Hé, Still Belgium is selected.
Try to select Netherlands (worked, a few weeks ago). Leave add-inn and start again. Still Belgium.

Ergo: Selecting an other country does not work anymore. Has it to do with the Locus transfer to SD-card? What can I do?

Thanks!
Paul.
Paul - did you get GH routing working again? I can see no other suggestions or further discussion in this topic. GH routing works for me in my native country - Tasmania/ Australia. But when I swap maps to France, ile-de-france.osm-gh, I get a Locus error displayed, possibly same as you? I am using GN 0.1.3. Routing works fine with BRouter. Both points are on the same map, and only 3km apart. I have tried points further and closer together.

(http://s2.postimg.org/gg4aw5a3p/2015_03_05_09_21_42.jpg) (http://postimg.org/image/gg4aw5a3p/)

(http://s2.postimg.org/u8iprs0v9/2015_03_05_09_21_58.jpg) (http://postimg.org/image/u8iprs0v9/)

edit
Whoops - I worked it out ::) - I must manually run the "Locus GraphHopper" app & explicitly select one of the GH regions I have copied to the GraphHopper folder. My mistake.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: gynta on March 05, 2015, 11:53:24
Quote from: Andrew Heard on March 05, 2015, 05:17:15...I must manually run the "Locus GraphHopper" app & explicitly select one of the GH regions...
..as i wrote in reply #1 in this thread
http://forum.locusmap.eu/index.php?topic=4036.msg30868#msg30868
Quote...
start aplication adon and choose source routing data
...
;D
but good to hear there is more interest about this addon.
And now we hope for an update  ;)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Andrew Heard on March 05, 2015, 23:43:46
Slightly off topic but after some email discussion with dev Peter from GraphHopper, I find a more important distinction between BRouter and GH - BRouter routing rules/ costs are heavily determined via a profile script which a user (non-programmer) can modify/ tweak or substitute, whereas GH routing rules/ costs are currently determined solely by the Java code within the packaged APK, meaning a non-programmer can't modify/ tweak or substitute other than choosing one of the 5 Locus profiles (fast/ short car, fast/ short bike, walker). I have found GH favors "dirt track" over "primary road" for a Locus "fast bike" profile however I have no control over this. I'd like to stay on the sealed road if possible. There is no current way to alter this logic, so I revert to using BRouter, even if Compute Instructions are not available.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: tommi on March 06, 2015, 03:41:01
I'm not really surprised.
What we've got up to now is the very first version of the Locus GraphHopper app, so to say an alpha or pre-alpha version.
Making a solution mature needs users testing it and giving feedback followed up by the developers fixing and improving it - none of these two conditions were met till now  :(
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Andrew Heard on March 06, 2015, 08:07:28
Just browsing the GH code, a tremendous amount of effort has gone into the project, so a big bravo to the developers. An amazing effort. I hope they continue to improve GH.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: jusc on March 06, 2015, 09:42:09
Quote from: Andrew Heard on March 04, 2015, 23:28:12

edit
Whoops - I worked it out ::) - I must manually run the "Locus GraphHopper" app & explicitly select one of the GH regions I have copied to the GraphHopper folder. My mistake.

Did anybody test what happens if you create a route that overlaps two regions. Iin BRouter there is no problem as long you have downloaded the needed *rd files, because you don´t have to choose the region.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: john_percy on March 06, 2015, 10:33:32
Quote from: jusc on March 06, 2015, 09:42:09
Did anybody test what happens if you create a route that overlaps two regions. Iin BRouter there is no problem as long you have downloaded the needed *rd files, because you don´t have to choose the region.
I seem to remember that Menion said earlier that one of the weaknesses of Graphhopper is that it cannot cross regions and that is why it will have to stay as an unsupported beta.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on March 06, 2015, 16:04:12
Yes and two more missing features ... one way roads and roundabouts. Anyway to be true I do not know if any of these issue is solved ...
Title: Re: Offline navigation - GraphHopper - preparation
Post by: tommi on March 06, 2015, 19:47:31
Quote from: menion on March 06, 2015, 16:04:12
Yes and two more missing features ... one way roads and roundabouts. Anyway to be true I do not know if any of these issue is solved ...
Give us a new version and new data and we'll find out
Title: Re: Offline navigation - GraphHopper - preparation
Post by: gynta on March 06, 2015, 19:58:41
 ;D
Title: Re: Offline navigation - GraphHopper - preparation
Post by: tommi on March 11, 2015, 19:55:25
Hey, GraphHopper 0.4 is out!
https://karussell.wordpress.com/2015/03/09/releasing-graphhopper-0-4-and-the-graphhopper-directions-api/

Wouldn't it be a good opportunity to update Locus integration of GraphHopper?
The outdoor season is coming soon and the questions for offline routing and navigation in Locus don't stop.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on March 12, 2015, 16:09:50
Yes, it's a good reason ... cannot promise now, but I'll try to look at it during March
Title: Re: Offline navigation - GraphHopper - preparation
Post by: jusc on March 14, 2015, 12:39:52
Thank you Tommi for this hint.
Unfortunately I can´t find any about the planned route overlaps more than one region.
But another feature sounds interesting. "Snap to Road" makes all of your recorded tracks looking perfect.  ;D
Title: Re: Offline navigation - GraphHopper - preparation
Post by: gynta on April 22, 2015, 16:19:54
FYI
fwd from http://help.locusmap.eu/topic/not-always-offline#comment-15835
Quote from: menionData are in preparation ... hope till end of April will be ready to download. I have to also find a time to update GraphHopper add-on, this will be worst ..
Title: Re: Offline navigation - GraphHopper - preparation
Post by: ringen00 on April 22, 2015, 18:24:16
Looks quite promising :-)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: john_percy on April 23, 2015, 14:46:00
Quote from: tommi on March 06, 2015, 19:47:31
Quote from: menion on March 06, 2015, 16:04:12
Yes and two more missing features ... one way roads and roundabouts. Anyway to be true I do not know if any of these issue is solved ...
Give us a new version and new data and we'll find out
I have just tested the latest version of GraphHopper on Emux's Atlas and it seems to know and respect roundabouts and one way streets.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Tomáš Janoušek on May 07, 2015, 02:05:15
Hello everyone,

as I was not very happy with the routes from MapQuest and YOURS and the other engines didn't have either instructions or a bicycle profile, I decided to give GraphHopper a try. Naturally I didn't want to use an old version of GraphHopper and OSM data, so I had to write a few lines of code myself. I ended up creating two things (in that order):


Usage:

If no gpx is downloaded, there should be an error in the developer console.

I'm sorry if things don't work or if the usage is strange. This is my first javascript since almost forever. Nevertheless I hope this may be useful for someone else as well. :-)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Andrew Heard on May 07, 2015, 05:28:07
Very interesting post Tomáš. Why did you choose GraphHopper instead of BRouter? For me offline BR with Locus has the advantage I can (with support from clever people) modify the selected fastbike.brf profile to suit local conditions (eg. cycling allowed on motorway, add more cost to gravel track) whereas with offline GH with Locus the rules & costs are not modifyable by an "ordinary" user, and there is no script customization possible. The script ability of BR has made its routing choices near to perfect.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Tomáš Janoušek on May 07, 2015, 12:08:49
Andrew, I didn't abandon BRouter completely. It stays as my engine of choice for offline route planning, although I haven't experimented with customizing the profiles yet. Anyway it's fine for planning medium range sport rides which I can memorize. However, on longer rides in unknown territory I'd much prefer to have good spoken navigation instructions and that simply isn't possible with BRouter. I know it's quite a limitation that I need to plan these routes online on graphhopper website, but for my intended usecase (long rides from A to B) it's okay.

But yeah, a customizable profile and offline routing with GraphHopper would be better, and I believe we'll get there in a few months/years. I just wanted to hack something together to have more options. Also, to be honest, I feel that the customizable profile might be a bit overrated, especially in our area where many roads/tracks are just guesses from low-res orthophoto maps that are years old and were never updates or modified afterwards (*). It's nice to have perfect routing, but it's not that useful if it's in an imaginary world. :-)

(*) I'd like to fix that but I have yet to figure out a way to do so. When I plan a sport ride I certainly don't want to stop every 500 meters to compare a map with reality and take notes. Carrying a GoPro in timelapse mode, uploading to Mapillary and fixing the map afterwards seems like a solution, but I'll need to make a habit out of it: the few times I tried it added a lot of overhead as well so I usually leave it at home and enjoy the ride instead. And I may need to get a few additional batteries. :-)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Andrew Heard on May 07, 2015, 12:51:40
Fascinating, thanks for the discussion. I didn't realize GH provided street names back to Locus. There are so many things that are only discovered the hard way because there isn't a comparison table. I gave up with GH because it chose a silly route along a gravel track of the same length as a quiet paved road right next to it. When I asked the GH developers they showed me where in the Java code to modify behavior, and agreed that bringing that logic out to a script would be nice, but no time soon. Hacking the BR profile for our local laws & my preferences was a great step forward.

Planning the routes online is a dream compared to offline. I wish it were easier.

I am finding the same comparing navigation and guiding modes - subtle differences that are not documented in just one easy to compare table. I've got a 1200km cycle sport ride in France in August, but the track planning was definitely not done by a routing engine. Every turn would have been physically planned & checked. I have a dyno on the front wheel, so batteries aren't a concern to me ;-)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Bucky Kid on June 08, 2015, 11:56:02
GH works better than MapQuest for me, however is there possibility for newer routing data (or way to create them from some online available data). I think uodate would be nice  :)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on June 22, 2015, 02:29:17
Uff new data, see first post. I've not tested it so hope it will work. And now excuse me, bed is calling ...
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Bucky Kid on June 22, 2015, 08:41:15
Awesome, thanks. Could we have a guide how to use the generator (I assume it serves for creating offline routing data from online source if I'm right)?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on June 22, 2015, 09:28:16
Yup, from OSM data. Description is in the link in first topic. Section "maps" contains few steps so use "generator.zip" from Google Drive for this task.

I still see there few major limitations
- for car - it is not simply possible to ignore highways
- generally it is not possible to route over more data files at once
Title: Re: Offline navigation - GraphHopper - preparation
Post by: john_percy on June 22, 2015, 13:00:19
Great. If anyone is interested I downloaded the British Isles routing data as described, as an osm.pbf file from http://download.geofabrik.de/ (http://download.geofabrik.de/) (it's a Special Region at the bottom of the Europe page) and generated GraphHopper files (actually using a function built in to Atlas but I'm sure it would work as menion describes) and now have offline routing in Locus across the whole of the British Isles. I'm happy.

Title: Re: Offline navigation - GraphHopper - preparation
Post by: tommi on June 24, 2015, 21:59:25
Hi Menion,
referring to your english post in the german part of the forum, precisely this one:
http://forum.locusmap.eu/index.php?topic=4661.msg37837#msg37837
I have problems with graphhopper data folder on external sd card.
I've placed all my vector maps at
/storage/extSdCard/LocusMassData/mapsVector
according http://www.locusmap.eu/locus-run-since-update-device-android-4-4-2-kitkat/#solutionC .

The vector maps are in sub folders for the continents. Locus is happy to use the vector maps from there.

In the same folder /storage/extSdCard/LocusMassData/mapsVector I have put the folder _germany.osm-gh
So it looks like:
/storage/extSdCard/LocusMassData/mapsVector/Europe/*.map
/storage/extSdCard/LocusMassData/mapsVector/_germany.osm-gh

The Graphhopper Addon doesn't find its data folder and complains I should place the data at /storage/emulated/0/Locus/mapsVector.
If I put the _germany.osm-gh to the recommended location in the Locus folder, GraphHopper Addon finds its data folder and I can use the router..
But due to free space limits I want to put all those bulk data to external storage.

As Balloni did, I deleted  the app data of GraphHopper addon. Next time I started the addon again it showed me the hint to put the data to internal storage as before.

Any idea?
Thanks,
Tommi
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on June 24, 2015, 22:35:20
tommi, this is correct behavior.

Locus, better "add-on" search for it's data in defined ROOT directory for Locus vector maps. By default, it is in Locus/mapsVector. You may anyway define this root directory to your SD card - http://docs.locusmap.eu/doku.php?id=manual:user_guide:settings:misc - "default directories" settings.

This say to Locus, that Locus/mapsVector is no longer used and for all operations is used directory on SD card. So also themes, also POIs, also maps. Anyway, warning - if you download maps from Locus Store, this will ends on some bad error probably, because Locus Store won't be able to write downloaded data to this directory.

Another alternative, from my point of view best in case of vector maps, is to place this "mapsVector" directory on SD card into /android/data/menion.android.locus(.pro)/files/... directory. Here have Locus full read/write access!! - check solution B http://www.locusmap.eu/locus-run-since-update-device-android-4-4-2-kitkat/#solutionB . Just keep in mind to not un-install Locus otherwise this directory will be deleted!

Helped?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: john_percy on June 24, 2015, 23:52:55
@menion: I think @tommi needs clarification on where the GraphHopper data should be put.
I have a gh folder at the same level as the map, which works. However the reference page seems to suggest that the map should be in the folder with the GraphHopper data.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on June 25, 2015, 07:18:58
hmm where you see that "map should be in the folder with the GraphHopper data"?

System is really simple. Directory Locus/mapsVector is container for all Locus vector (mapsForge) maps. And in same directory should be routing data for graphHopper. It is the place, were add-on search for them. No matter how deep (nested subfolders) they are, add-on just search for directories that ends with "-gh".
Title: Re: Offline navigation - GraphHopper - preparation
Post by: john_percy on June 25, 2015, 08:25:34
Quote from: menion on June 25, 2015, 07:18:58
hmm where you see that "map should be in the folder with the GraphHopper data"?

System is really simple. Directory Locus/mapsVector is container for all Locus vector (mapsForge) maps. And in same directory should be routing data for graphHopper. It is the place, were add-on search for them. No matter how deep (nested subfolders) they are, add-on just search for directories that ends with "-gh".
See the link "how to generate routing data" in your first post; then point 4: put berlin.map in the same folder as your routing data.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: tommi on June 25, 2015, 08:54:39
@Menion: my point is that I just want to have all bulk data for Locus on ext SD. This includes vector maps, Pois, srtm data and last but not least routing data.

You wrote, user should put the *.gh next to vector maps. This is just what I did.
The logic in Locus is there to find vector maps in extra folder. It just does not seem to work for  *.gh.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: john_percy on June 25, 2015, 09:04:58
It works for me. Did you run the Locus GraphHopper add-on after downloading it and select the data directory?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: balloni55 on June 25, 2015, 09:49:03
QuoteI deleted  the app data of GraphHopper addon. Next time I started the addon again it showed me the hint to put the data to internal storage as before
are you sure you have set directory "maps vector to extern SD" before you reseted GH? Have you tryed to delete GH and reinstall it?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on June 25, 2015, 18:09:09
Quote from: john_percy on June 25, 2015, 08:25:34
See the link "how to generate routing data" in your first post; then point 4: put berlin.map in the same folder as your routing data.
Hmm link leads to official graphHopper docs and they are quite confusing when used on Locus. So I've rather copy&paste only first two lines, thanks

@tommi: oki, understand. So this do not work in this way. Same with POI's (probably). So please, keep in mind, that routing data have to be in default directory defined for vector maps. So by default in Locus/mapsVector
Title: Re: Offline navigation - GraphHopper - preparation
Post by: john_percy on June 25, 2015, 18:19:10
I have maps in sdcard1/Locusmaps/ and use a routing data folder in the same location. The vector maps directory is defined by me in Locus settings.
This is on a MotoG upgraded to Lollipop.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on June 28, 2015, 22:43:58
New version of add-on in first post.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: pelsta on July 03, 2015, 08:56:03
I've installed version 0.1.6  GraphHopper.
After leaving the roundabout, after some time, Locus generates a voice message "roundabout_exit" twice.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on July 03, 2015, 15:52:57
hmm never tried, but i do not expect it. Thanks, I'll try it ...
Title: Re: Offline navigation - GraphHopper - preparation
Post by: tommi on July 03, 2015, 17:12:47
In 0.1.6 I still see lots of crashes of the addon. I would say roughly every third call to the addon by Locus ends with "problem with service". I can provide log if needed.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on July 03, 2015, 17:24:59
It will be useful. During last around 14 days, I ride with this add-on around 600 km and no single crash. Weird ...

EDIT:
Confirmed, GH require write access permission!

When I moved GH to SD card, then after start, GH produce this error:

java.lang.RuntimeException: To avoid reading partial data we need to obtain the read lock but it failed. In /storage/sdcard1/maps/mapsVector/europe/czech-republic-latest.osm-gh




Hmm ... btw. did you tried latest version 0.1.7? (I've fixed it thanks to one optional parameter GraphHopper offer).
Title: Re: Offline navigation - GraphHopper - preparation
Post by: tommi on July 03, 2015, 18:21:43
Quote from: tommi on July 03, 2015, 17:12:47
In 0.1.6 I still see lots of crashes of the addon. I would say roughly every third call to the addon by Locus ends with "problem with service". I can provide log if needed.
Sent mail, service request #7335
Title: Re: Offline navigation - GraphHopper - preparation
Post by: tommi on July 03, 2015, 18:26:45
Quote from: tommi on July 03, 2015, 18:21:43
Quote from: tommi on July 03, 2015, 17:12:47
In 0.1.6 I still see lots of crashes of the addon. I would say roughly every third call to the addon by Locus ends with "problem with service". I can provide log if needed.
Sent mail, service request #7335
Tried the up to 5minutes ago unknown 0.1.7: Same result, the crash with "problem with service" occurs again. I guess no new log needed for the moment.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on July 03, 2015, 19:11:46
Thanks tommi for a log,

07-03 17:43:26.922 29320 29330 E libc++abi: terminating with uncaught exception of type std::bad_alloc: std::bad_alloc
07-03 17:43:26.922 29320 29330 F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 29330 (Binder_2)

Error seems to be something in C++ code, which is out of Locus or add-on. Hard to say, maybe too huge file?

And second error, as you wrote:

07-03 17:46:24.162 30592 30606 E ComputeTrackService: Caused by: java.io.IOException: mmap failed: ENOMEM (Out of memory)

Heh, "OutOfMemory" - no comment.

Tommi, please try just one area in Germany, not a whole file.

Fortunately I hope I finally convinced Peter to generate Germany separated in half to two files, so also GH data will be just for a half of Germany next time.

Seems that you have these issues really only because of huge size of GH file for Germany.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: tommi on July 03, 2015, 21:46:09
Using Bavaria instead of Germany solved the problem. Thanks!
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on July 03, 2015, 22:09:04
Perfect, glad to hear.

After my personal tests, seems that current GraphHopper version together with new "via points" brings really fully functional (and fast!) offline navigation also usable with "recalculate" feature. Perfect! Hope you will have also positive feelings from this :) and wish you a nice, too hot, weekend!
Title: Re: Offline navigation - GraphHopper - preparation
Post by: TrulloF on July 04, 2015, 23:55:13
Hi.
Something must have been changed from version 0.1.5 onward, because with that version I could even use a graph generated for DACH! without any issues. Okay it was rather slow, but it worked. Now, starting from version 0.1.6 I miss the icons to start navigating (car, foot etc.). I'm using the latest version from play store (3.10.0) on my xperia z1c, using android 4.4.4 (firmware .108). Any ideas, what causes that?
Kind regards
TrulloF

Okay, after some testing and generating routing data for Eastern and Western Germany, as well as comparing the size of routing data for France, it seems that the new graphhopper addon since version 0.1.6 has problems with routing data above 1 GB. Unfortunately 0.1.5 doesn't work anymore in Locus Pro 3.10, but it worked without a flaw in the previous version together with routing data way above 1 GB (Germany, DACH). Could you please look into this? Thanks in advance.

By the way, I like the graphhopper navigation because it includes most street names, but brouter creates better and more logical routes imho.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: pelsta on July 11, 2015, 00:14:18
There's version 0.1.7 on google drive. What's new?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: gynta on July 11, 2015, 00:24:55
> http://forum.locusmap.eu/index.php?topic=4036.msg38098#msg38098
he fixed "it"... ;)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Bucky Kid on July 11, 2015, 13:44:46
Hello there

Please advice how can I run graphhopper.sh import <your-osm-file> on Windows

Running this in MSYS produces an error complaining something about Java, I can't process further

Thanks for help!

$ bash ./graphhopper.sh import czech-republic-latest.osm.pbf
## using java  from
## using existing osm file czech-republic-latest.osm.pbf
./graphhopper.sh: line 82: mvn: command not found
## existing jar found tools/target/graphhopper-tools-0.5-SNAPSHOT-jar-with-dependencies.jar
## now import. JAVA_OPTS=-Xmx10200m -Xms1024m -server
./graphhopper.sh: line 253: java: command not found


Btw. what are changes in add-on 0.1.7 ?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: silvermapper on July 25, 2015, 17:52:57
I have become fascinated by Locus Map since I installed it a couple of weeks ago.  Now, I read about GraphHopper with interest and would like to try it.  I have read and re-read http://forum.locusmap.eu/index.php?topic=4036.msg30647#msg30647 but do not understand fully what I should do.  I wonder, might it be possible to compile and provide a fresh step-by-step process for Android mobile 'phone users like me who are full of enthusiasm but lack confidence and knowledge to undertake some tasks?  Additionally, I noted John Percy's reference to a British Isles osm.pbf file from http://download.geofabrik.de/.  I have used Geofabrik in conjunction with my Garmin eTrex Legend and wonder whether this data source has advantages or whether it is simpler to take data from the link menion describes in his initial post of the link above?
Incidentally, where lie the differences between, or preferences for, the forum or the help desk?  I discovered the help desk quite by chance, recently.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: gynta on July 25, 2015, 19:32:38
Quote from: silvermapper on July 25, 2015, 17:52:57I have read and re-read http://forum.locusmap.eu/index.php?topic=4036.msg30647#msg30647 but do not understand fully what I should do.
Hmm ok,and how can we help you? because what u read is all what you need to install.

Is your problem the installation of GraphHopper or it's difficult for you to understand how it works any of this routing services inside Locus? Or is it the creation of your own graphhopper routing profile?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: silvermapper on July 26, 2015, 09:34:02
gynta
I thank you for your reply.
1. I read the forum on my Windows PC.  Therefore, I would download the addon_0.1.7.apk file and routing data from the links to Google Drive provided to Windows Explorer in the first instance.  Is that the correct procedure or should everything be carried out on my 'phone?
2. The routing data I wish to use is at 2015.06.05>europe>united_kingdom.  It appears in the form of england-gh.zip, scotland-gh.zip, etc.  I do not see a united_kingdom-gh.zip file or great_britain-gh.zip file, nor does the United Kingdom folder appear to be a .zip folder.  Clicking england-gh.zip presents a folder, england.osm-gh.  The only way I see to download it is that when a cursor is moved, a downward facing arrow appears which, when a cursor is placed over it, reveals 'Download'.  Clicking this presents 'Google Drive can't scan this for viruses' and 'Download anyway',  This I did to Windows Explorer again and extracted all the files.  Do I copy the resulting england-gh folder or the folder within it, england.osm-gh, or does it not matter which?
3. Having downloaded the addon_0.1.7.apk file, I have no idea how to install it on my 'phone let alone where.  Do I copy it, use 'Send to' or am I in the wrong place, completely, anyway?
I do hope you understand that what is a straightforward exercise for so many presents me and some others, presumably, with such issues.  That is why I should appreciate more explanatory help.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: gynta on July 26, 2015, 09:57:37
@apk:
use google search: "how to install apk on android"

@england-gh.zip:
extcract the zip and copy "england.osm-gh" folder to .../Locus/mapsVector/
(http://s12.postimg.org/9myw2kpuh/2015_07_26_100828.jpg) (http://postimg.org/image/9myw2kpuh/)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: KaHeMu on July 26, 2015, 11:10:16
 It is a question to voldapet: Where is United_Kingdom_gh_zip??
Title: Re: Offline navigation - GraphHopper - preparation
Post by: silvermapper on July 26, 2015, 11:16:43
Thanks, gynta.
Just to be sure: is there a particular place to which the .apk file should be copied before installation for GraphHopper to work with Locus Map and the chosen routing data?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: gynta on July 26, 2015, 11:32:43
Quoteis there a particular place to which the .apk file should be
no - and after install the apk - you can throw it in the trash




Quote from: KaHeMu on July 26, 2015, 11:10:16
It is a question to voldapet: Where is United_Kingdom_gh_zip??
good question - but not for Petr :)
Whole UK (England, Scotland, Wales and Northern Ireland) has 470MB - not a big deal to offer a all in one file - isn't it Menion?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: silvermapper on July 26, 2015, 16:04:53
Now, I'm becoming a pain.  I reached so far as changing the data source from MapQuest to GraphHopper when something happened: A message displayed stating, "Unfortunately, Locus Pro has stopped."  Each time I open it a window displays briefly that I do not have time to read properly but is headed, Working..." then "Previous State".  I have powered down the 'phone twice but to no avail.  The same message appears as soon as I select 'Navigate to' in 'FUNCTIONS' or its icon on the side panel.  My set up is as follows: the GraphHopper routing data for England and my Great_Britain.map file are both in Computer\XT1039\Internal storage\Locus\mapsVector.  Is it likely that the map file has to be of England alone, also?  I should appreciate any help because I am so interested to get GraphHopper up and running.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: gynta on July 26, 2015, 16:11:28
Do you have an old "graphhopper" folder inside locus?

Please create screenshots (like i do above) from your file structures.

eg
storage\Locus..
storage\Locus\mapsVector
storage\Locus\mapsVector\england.osm-gh
...
Title: Re: Offline navigation - GraphHopper - preparation
Post by: silvermapper on July 26, 2015, 17:42:26
gynta
This is my first time attempting to use GraphHopper.  I placed addon_0.1.0.7.apk in the root of my internal storage and installed it from there.  Its 'Properties' dialog dispalys a package name, com.asamm.locus.addon.graphhopper.  A search of internal storage shows com.asamm.locus.addon.graphhopper_7 file of 0 bytes.  I do not begin to know the relevance of this but give it to you in case it helps.
I attach the three screenshots you requested.  I  note that I have an intermediate folder, sdcard0\Locus\mapsVector\england-gh.
I thank you for your continued assistance.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: gynta on July 26, 2015, 18:07:07
QuoteI note that I have an intermediate folder, sdcard0\Locus\mapsVector\england-gh
Why?
Please see my screenshot again and compare!
(http://s13.postimg.org/3umin13gz/2015_07_26_100828.jpg) (http://postimg.org/image/3umin13gz/)

(http://s27.postimg.org/jj3aaz28f/sdcard0_Locus_maps_Vector.jpg) (http://postimg.org/image/jj3aaz28f/)  (http://s27.postimg.org/lc66zanf3/sdcard0_Locus_maps_Vector_england_gh_england_osm.jpg) (http://postimg.org/image/lc66zanf3/)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: silvermapper on July 26, 2015, 18:42:34
Moving england.osm-gh out of england-gh and deleting england-gh folder as in screenshot attached makes no difference.  I powered off the 'phone, too, and cleared the cache, just in case.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: gynta on July 26, 2015, 19:01:44
What happens when you tap the Locus GraphHopper AddOn App on the homescreen?
(http://s8.postimg.org/vvzht4f81/image.jpg) (http://postimg.org/image/vvzht4f81/)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: silvermapper on July 26, 2015, 19:15:43
See attachment.  Tapping 'england.osm' displays another 'england.osm', nothing more.  Should it?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: gynta on July 26, 2015, 19:20:06
that's ok.
hm, for now - i have no more ideas.
maybe a logfile helps:
http://docs.locusmap.eu/doku.php?id=manual:faq:issue_reporting
http://docs.locusmap.eu/doku.php?id=manual:faq:how_to_create_debug_log
Title: Re: Offline navigation - GraphHopper - preparation
Post by: silvermapper on July 26, 2015, 19:24:30
gynta
What a shame!  I thank you for your efforts.  Meanwhile I shall attend to the log files.

edit
gynta
Would you believe it?  I was repeating the action that caused the "Unfortunately, Locus Pro has stopped." message, in order to create a logfile.  It did not appear.  I checked that GraphHopper was the selected router and yes, it was!  I have chosen a destination and it works!  Let's celebrate (while keeping fingers crossed)!
What I love is that requesting a short route by foot from my home, most routing applications will insist upon taking a nearby road instead of footpaths where available.  GraphHopper has been the first I have experienced to take the same route as I would and has done so in several other cases to date, too.  That is why I am an advocate of it.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: gynta on July 26, 2015, 19:54:37
Quote from: silvermapper on July 26, 2015, 19:47:07
Would you believe it?... while keeping fingers crossed
Yes :D ... me too.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: karussell on July 30, 2015, 08:54:49
Hi together,

author of GraphHopper here. I really need to read through this whole thread here now, but first of all: thanks to @menion for making this happen and for the others that you provided feedback etc!

Now regarding some points:
* indeed offline was not the main focus for me but this does not mean that you should not focus on it :)
* offline maps generation should be updated more often, more areas? I still cannot promise something here, sorry
* more profiles, different vehicles: we are working on this. E.g. more profiles are now possible with the speed-mode in a dev branch

@menion is your work open source or how others usually contribute to this? Regarding the some technically points: Do you start a web server on the device to serve JSON or how does this work?

I would really like to see this add-on for a broader audience, even more integrated and easier to setup. We've an Android demo which e.g. allows one to easily download certain maps, see the apk here: https://graphhopper.com/#community

How else do you think could we improve the installation procedure? And what are the 3 main pain points for you or most wanted features?

Regards,
Peter
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on July 30, 2015, 11:35:17
Hello Peter,

nice to have you here too :). Welcome.

Whole add-on for Locus is made in little bit different way. Imagine it as a standalone application, but binded over Android service directly into Locus system.

Add-on has public code here: https://bitbucket.org/asamm/locus-map-add-on-graphhopper, I've just committed latest changes so code is actual.

Currently no-one contribute here, mainly because it is not needed at all. Add-on itself do not do any hard work. Locus just bind to this add-on, send required parameters and wait for computed tracks. Check mainly RoutingSevice class where all hard work is done.

So no online usage, no web server, just an Android system of communication. Even with this system, add-on is independent on Locus and different apps may use it also in case, they will communicate with this add-on with defined methods.

Installation here also won't be a problem. Once we (team behind Locus) and You decide, that GraphHopper is mature enough, to publish it as regular app on Google Play, we will do it. Users will then need only to download it from GP. Data will be available over existing Locus Store directly in application, so no problem with installation.

Anyway 3 main pain points I have -
1. due to lack of deep programming skills, my major problem is compiling of add-on :). Currently when I execute build in gradle, I get below error I'm unable to solve. Some problem on my side, I know, but why when all other tasks works? Sometimes for unknown reason I have problems with error due to dependency on slfj library, usually I'm also not able to find a place where to download working jar file and so on. Some funny problems for skilled developer, but small private nightmares for me :)

Error:Execution failed for task ':addonGraphHopper:preDexAddonGraphHopperDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1

Anyway back to GraphHopper. Just a few days ago, I was on 4 days trip on motorcycle. From Prague to Austria and back, all together around 1500 km and all only with GraphHopper. It works, it is fast and usable, nice. With roundabouts it finally make sense even for moto/car.

Anyway two major problems -
2. too much navigation commands ... usually I get huge list of commands, when most of them are "straight". I also discovered before in Czech, then when main road (primary) turns left and secondary road continue straight, GraphHopper did not notify to turn left. Not sure if it happen on all places, but at least twice it happen to me. And in Czech, difference between primary and secondary round between villages is sometimes un-noticable

3. inability to route over more files - I have to use Locus tool "add new route" and plan with one file from Prague to border with Germany, then switch data file, plan over Germany, then switch data file to Austria and plan to target. Quite complicated and it also disable possibility to "auto-recalculate".

4. one last big issue for me as user - I had to generate special data file with type=motorcycle, because I wanted to disable planning on highways and I do not found this directly over GHRequest class as it seems, supported roads are hardCoded in FlagEncoder right? I see here solution by creating own FlagEncoder with possibility to dynamically enable/disable certain osm tags.

Sorry for a longer post, but ... you asked :).

Good luck with you work and wish your head, many good ideas!
Title: Re: Offline navigation - GraphHopper - preparation
Post by: tommi on July 30, 2015, 12:51:06
Hello Peter,
as experienced user of Locus and especially it's "inherited" routing and navigation capabilities I observed few mistakes/obstacles as well.
I could summarize them by my own but there is already a quite accurate description here:
https://github.com/graphhopper/graphhopper/issues/94 comment of jansoe on 6 Feb 2015.
Thanks for this great project!
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on July 30, 2015, 13:07:02
Ah nice report from jansoe. Thanks tommi, this cover my very inaccurately wrote issue 2.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: karussell on August 07, 2015, 10:45:00
Hmmh, someone moved too many replies into a separate thread. Here is the link for reference: http://forum.locusmap.eu/index.php?topic=4742.0
Title: Re: Offline navigation - GraphHopper - preparation
Post by: ringen00 on August 16, 2015, 09:23:08
Locus force closes when using GH (0.1.7) for navigation.
Tried the newest data also!
OPO CM11
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Bucky Kid on August 16, 2015, 09:30:35
Quote from: ringen00 on August 16, 2015, 09:23:08
Locus force closes when using GH (0.1.7) for navigation.
Tried the newest data also!
OPO CM11

That's right, latest add-on doesn't work with data generated by new graphopper version (independent on flags used to compile). Hopefully menion updates the addon soon.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: karussell on August 16, 2015, 11:02:13
> Locus force closes when using GH (0.1.7) for navigation.

It is important that you create the data with the same GraphHopper version that is used for the locus add-on.

GraphHopper 0.5 released a few days ago and this is incompatible with older versions. You should try to switch to the 0.4 branch to create data for the locus add-on I guess, or update the add on to the latest version (it is open source too).

Try:

git checkout 0.4
./graphhopper.sh clean
./graphhopper.sh import your-area.pbf

Title: Re: Offline navigation - GraphHopper - preparation
Post by: ringen00 on August 16, 2015, 15:11:33
Thanks! I'm not generating any data myself - completely dependent on post one of this thread!
0.1.7 didn't work with my old data so I tried it with new data which failed too...
Title: Re: Offline navigation - GraphHopper - preparation
Post by: gynta on August 16, 2015, 15:50:46
Quote"Locus force closes when using GH (0.1.7) for navigation"
hmm, very short error report and it's difficult to help.

try to deinstall all graphhopper apps and addons.
if exists - delete the old Locus/graphhopper folder.
install last locus version.
read first post in this topic.
read all posts in this thread.

any ideas what's wrong with your installation?
because i didn't fount any problems here on my devices.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on August 17, 2015, 18:47:11
Fine, so I was able to build new version of add-on 0.1.8, based on GraphHopper 0.5 source code. It is available on Google Drive, directory data/testing.

Testing because I'm unable to compile builder for creating maps.

These steps on fresh downloaded repository
git checkout 0.5
./graphhopper.sh clean
./graphhopper.sh import your-area.pbf


Ends on this error:
[INFO]
[INFO] --- maven-assembly-plugin:2.5.5:single (default-cli) @ graphhopper ---
[INFO] Reading assembly descriptor: src/main/assembly/android.xml
[INFO] Building jar: /Users/menion/work/projects/foreign_projects/graphhopper/core/target/graphhopper-0.5.0-android.jar
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] GraphHopper ........................................ FAILURE [ 56.470 s]
[INFO] GraphHopper Tools .................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 56.905 s
[INFO] Finished at: 2015-08-17T18:44:16+02:00
[INFO] Final Memory: 91M/123M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.5.5:single (default-cli) on project graphhopper: Failed to create assembly: Error creating assembly archive android: Problem creating jar: Execution exception: Java heap space -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException


Any help is of course welcome. :)

@karussell:
Please just update link to Locus add-on here: https://github.com/graphhopper/graphhopper/blob/0.5/docs/android/index.md , to new address: https://bitbucket.org/asamm/locus-map-add-on-graphhopper . I was updating namings and it seems to change URL as well. Thanks
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Bucky Kid on August 17, 2015, 19:17:29
So I'm getting Locus error when trying to get access navigation service configuration:
(http://images.tapatalk-cdn.com/15/08/17/0a0406f783200d1a9816ebe003ebed9d.jpg)

edit
Already working but Locus has another problem with new addon, no means of transport is available (even with graphHopper 0.4 data)
(http://images.tapatalk-cdn.com/15/08/17/0e6d49b989d1eb98c34777e800f3f1fa.jpg)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on August 17, 2015, 20:31:17
new add-on require new data, without it, it won't work.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Bucky Kid on August 17, 2015, 20:42:12
Ah so. But I've tried graphHopprr 0.5 data too, and still no way of transportation.

Btw. - graphHopper from github is already 0.6
I can't compile with this

Sent from my phone by Tapatalk
Title: Re: Offline navigation - GraphHopper - preparation
Post by: karussell on August 22, 2015, 18:56:04
Just keep in mind: the master on github is 0.6 but is unstable and you should use the stable 0.5 and switch only 0.6 if you know what you do or for a development version of the add-on or similar

@menion: it looks like the compilation needs more memory, I got similar problems on a dev machine although enough RAM was available. Try MAVEN_OPTS=-Xmx200m or more MB
Title: Re: Offline navigation - GraphHopper - preparation
Post by: john_percy on September 28, 2015, 19:31:49
@menion: When next you update the GraphHopper add-on, could you put the hiking image to the right of the cycling image in the dialogues, for the sake of consistency, please!
(http://s29.postimg.org/v7udejeoj/hiking.jpg) (http://postimg.org/image/v7udejeoj/)
BRouter (and others) | GraphHopper
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on September 29, 2015, 12:27:48
thanks, agree. Will be fixed in next version (of Locus)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Vissie on October 06, 2015, 14:21:42
Hi guys.

So firstly, thx. This addon works great! And it actually routes offline. Thx.

This will now be my routing engine of choice. I have Android car radio for my Jeep, so this will go in there.

I do have 2 semi related questions.

1. I have 2 maps on my phone. One for South Africa and one for Mozambique. I downloaded them from a google share on page one. Works great. I can route anywhere in SAF to anywhere in SAF. I can also route anywhere in Mozambique to anywhere in Mozambique. BUT, I can not go across the border as these is 2 different map sets. How do I combine the 2?

2. Then just in-case you suggest that I need to recompile my own maps, I tried that. Hence my second query. I can not complete the import process on this laptop as I do not have enough RAM. I get out of memory issues. And yes I have played with the Xmx and Xms settings. I just do not have enough RAB. I have only 2.7 Gig. So I created a VM using VirtualBox on my work Windows (sorry) laptop running Debian. On that I assigned 4 Gig. BUT I get this error then I do the import: Non-resolvable parent POM: Could not transfer artefact org.sonatype.oss-parent:pom:9 from/to central. Unknown error and 'parent.relativePath' points at no local POM @ line 16, column 13: Unknown host repo.maven.apache.org. But like I said, it starts on my Linux laptop, just runs out od memory. Any ideas?

Vissie
Title: Re: Offline navigation - GraphHopper - preparation
Post by: john_percy on October 07, 2015, 09:54:54
It is a limitation of GraphHopper that it can't compute routes from one map area to another. Have you tried BRouter? That works well for me offline.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Vissie on October 14, 2015, 20:51:53
Hi. Yes I am using BRouter. Its OK. I am playing to see what other offline routing options there is.
I will continue using GraphHopper. Its seems new and fun.

Vissie
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Andrew Heard on October 15, 2015, 06:56:26
BRouter also has advantage over Graph Hopper of text based profiles. You can have any number of profiles, and they are very powerful & flexible.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: silvermapper on October 19, 2015, 09:29:55
I read of GraphHopper version 0.1.8 in Locus Map Help Desk.  I use the GraphHopper add-on version 0.1.7 by courtesy of menion's first post of this topic, a link in which takes me to Google Drive.  I guess routing data must be updated continually to keep abreast of changes and additions.  I wonder where later versions and their update information are available, and how one can be advised or know of updates?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on November 08, 2015, 08:31:14
New version of

- add-on, v 0.2
- routing data generated from OSM 2015.09.19

All based on GraphHopper v 0.5

PS: data are just uploading, so if they are not yet ready to download, they will be within next few hours
Title: Re: Offline navigation - GraphHopper - preparation
Post by: silvermapper on November 09, 2015, 19:33:32
menion
I have installed GH addon 0.2 - based v0.5.apk in place of addon_0.1.7.apk and used the latest GraphHopper routing data from 2015.09.19 - v0.5 at https://drive.google.com/folderview?id=0B7v_sPhHE6RgfjJZbEtsS1VnSWRMTDZUZGw3TlN4WTZLMHVUbTUtUGwtVUFvVlFVWlN6MDA&usp=sharing in place of its predecessor.  I am pleased to report routing works for the navigation tests I have tried so far.
I thank you for the work you have put in to provide this update.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on November 10, 2015, 12:20:51
perfect, this is what I hoped to hear. I've tested new version of GH just on couch, but hope that improvements made mainly by @karussell will be useful in the field!
Title: Re: Offline navigation - GraphHopper - preparation
Post by: silvermapper on November 11, 2015, 20:35:53
menion
I wonder: might it be possible when you have time that you create a generator for the 0.2.0 add-on as you did for addon_0.1.7?  I found it useful recently for creating an up-to-date england.osm-gh routing file, for example, and I imagine it might be useful, too, for those who desire an area not contained in 2015.09.19 - v0.5.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Haggi on November 12, 2015, 08:10:07
Thank you.. new version work perfectly! Use it 10 times a week. Dont like the geeky BRouter..  ;)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: poutnikl on November 12, 2015, 08:21:39
Each product has its customers, none is intended to serve all , whatever product domain is considered.

For off-line car navigation, GH is definitely a good choice.

For bicycle and foot navigation, one can have with GH any ice cream flavour whatever one wants, if it is vanilla. Nothing bad with vanilla. For other flavours, there is the Brouter.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: poutnikl on November 12, 2015, 08:39:06
Quote from: menion on July 16, 2014, 20:43:19
Hi guys,

new version of add-on GraphHopper - 0.1.7

Requirements: Locus Map 3.9.3.3+

Download from HERE (https://drive.google.com/folderview?id=0B7v_sPhHE6RgfjJZbEtsS1VnSWRMTDZUZGw3TlN4WTZLMHVUbTUtUGwtVUFvVlFVWlN6MDA&usp=sharing)   data/GH addon 'version' - based Y.apk and install.

Download from HERE (https://drive.google.com/folderview?id=0B7v_sPhHE6RgfjJZbEtsS1VnSWRMTDZUZGw3TlN4WTZLMHVUbTUtUGwtVUFvVlFVWlN6MDA&usp=sharing) 'date' - Y/your country/*-gh.zip routing file


It seems the names and the contents of Google drive subfolders is switched. The apk is in data folder, while data are in apk folder.  :)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Haggi on November 12, 2015, 09:53:43
Quote from: poutnikl on November 12, 2015, 08:21:39
Each product has its customers, none is intended to serve all , whatever product domain is considered.

For off-line car navigation, GH is definitely a good choice.

For bicycle and foot navigation, one can have with GH any ice cream flavour whatever one wants, if it is vanilla. Nothing bad with vanilla. For other flavours, there is the Brouter.

I visited your Wiki... You certainly got me curious! Bookmarked..
I just don't think Brouter is very well integrated in Locus, but that's a personal experience. Gave GH a go when I found this thread and got stuck in old habbits.
I don't do alps or off-piste skiing, mainly hiking on known trails towards next geocache container..  ;)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: john_percy on November 12, 2015, 10:18:28
Would it make sense to ask menion to allow Locus to choose different routing engines according to travel mode?
I would like to choose GraphHopper for car travel and BRouter for travel by foot.

Quote from: poutnikl on November 12, 2015, 08:21:39
Each product has its customers, none is intended to serve all , whatever product domain is considered.

For off-line car navigation, GH is definitely a good choice.

For bicycle and foot navigation, one can have with GH any ice cream flavour whatever one wants, if it is vanilla. Nothing bad with vanilla. For other flavours, there is the Brouter.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: poutnikl on November 12, 2015, 10:25:39
It was already explicitly asked as the idea in Help desk.

Sent from Sony Xperia M Dual

Title: Re: Offline navigation - GraphHopper - preparation
Post by: john_percy on November 12, 2015, 13:14:52
Is this the suggestion that you refer to: http://help.locusmap.eu/topic/independent-configuration-of-navigation-services-for-carbikefoot ?
I found the suggestion hard to track down on the help desk!
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on November 12, 2015, 17:08:10
creating own routing data - pack with generator added. Anyway suggest to read "how to" on pages of graphhopper

separating profiles - don't talk me about this. I think on it for last few years always when I wants to use Locus on bike, when it was previously used in car :).
Title: Re: Offline navigation - GraphHopper - preparation
Post by: michaelbechtold on November 12, 2015, 17:37:57
Each red traffic light should give some minutes to fix this and expand Locus feature :-)

Gesendet von meinem SM-N9005 mit Tapatalk

Title: Re: Offline navigation - GraphHopper - preparation
Post by: michaelbechtold on November 12, 2015, 17:38:18
No vote needed ...

Gesendet von meinem SM-N9005 mit Tapatalk

Title: Re: Offline navigation - GraphHopper - preparation
Post by: poutnikl on November 12, 2015, 17:41:38
Quote from: john_percy on November 12, 2015, 13:14:52
Is this the suggestion that you refer to: http://help.locusmap.eu/topic/independent-configuration-of-navigation-services-for-carbikefoot ?
I found the suggestion hard to track down on the help desk!

The help looks like a candy, Yes., that one,. Also closely related
http://help.locusmap.eu/topic/short-fast-pedestrian-navigation-modes-fro-brouter-navigation
http://help.locusmap.eu/topic/global-settings-profiles-for-navigationguidance-settings

Personally, I quite like the OSMand approach. Anytime aOSMAnd user enters the part of configuration related to navigation, he is asked for the context ( car / bike / foot ).
Title: Re: Offline navigation - GraphHopper - preparation
Post by: poutnikl on November 13, 2015, 07:04:18
Interesting is this note on GraphHopper Github page,
what means similar limitations for proper car navigation, as Brouter admits:

"Please note that currently none of the vehicles accounts for turn restrictions."

https://github.com/graphhopper/directions-api/blob/master/supported-vehicle-profiles.md
Title: Re: Offline navigation - GraphHopper - preparation
Post by: john_percy on November 13, 2015, 08:32:15
That refers to the GraphHopper Maps web engine which runs in speed-up mode.
GraphHopper itself includes the possibility of turn costs and turn restrictions but requires turn costs to be turned on:
QuoteThe turn restriction (also turn cost) feature is currently not implemented for the speed-up-mode, and this speed-up-mode is used in GraphHopper Maps. But you can enable the flexibility mode in the config.properties and it will work
In the graphs I use which I prepare using Atlas, turn costs are on for car routes and off for bike or foot. As far as I can tell, the same is true for the graphs menion has prepared and made available (though I only checked Gibraltar).

Title: Re: Offline navigation - GraphHopper - preparation
Post by: silvermapper on November 13, 2015, 10:58:09
menion
I thank you for providing the new generator so quickly in response to my request.  I look forward to the same success I had with version 0.1.7 when I try it.  With reference to your comment 'Anyway suggest to read "how to" on pages of graphhopper', I executed that particular process with much patient assistance from karussell here: https://discuss.graphhopper.com/t/graphhopper-locus-map-add-on/207/8 but as I wrote there, the resulting .osm-gh file was not liked by Locus Map.  The one produced using your generator was liked, however, to my immense satisfaction.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Marcus Aurelius on December 07, 2015, 08:27:30
Graphhopper works fine, changed to it from Brouter to it, and I see that the routes are more convenient to my own experience...
But I do have a problem now. Lately I noticed a problem with Locus. When I shut off the smartphone, and I go into Locus, Locus does not find the vectormaps, directory. So no maps. Setting up the standard vector maps again, Problem solved. Setting Brouter later on, and setting Graphhopper again, and I get the message 'no data found' ... Playing a bit with the standard directory settings again, and okay ... it works again, Dont know if it's a graphhopper or locus problem in general or smartphone or SDcard..... Experience ?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: poutnikl on December 07, 2015, 10:39:20
Quote from: Marcus Aurelius on December 07, 2015, 08:27:30Graphhopper works fine, changed to it from Brouter to it, and I see that the routes are more convenient to my own experience...

GraphHopper is for obvious reasons the preferred option for offline car navigation.

For bike and cars, you have just experienced Brouter profiles that do not suits you. As Brouter route quality raises and falls with level of matching the profile to user preferences. And that is the reason why for many users is Graphhopper better=easier solution.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: silvermapper on December 16, 2015, 13:10:37
I wish to create GraphHopper routing data updates frequently to reflect my recent OSM input and assist me in checking further OSM paths and their attributes in my area.  I downloaded GH addon 0.2 - based v0.5.apk and associated routing data following menion's announcement in Reply #150.  My Reply #151 confirmed everything worked.
I have tried two methods to create routing data that Locus Map will accept.  Both failed.

1. menion's generator:  I downloaded graphHopper.zip and extracted it; downloaded an england.osm.pbf file to the same location as graphhopper.sh and ran the command in Cygwin.  Here is the result:
Bob@Dellcomputer /cygdrive/c/users/bob/downloads/graphhopper/data/version_0.2.0/graphhopper/graphhopper
$ export JAVA_OPTS="-Xmx1g -Xms1g"
Bob@Dellcomputer /cygdrive/c/users/bob/downloads/graphhopper/data/version_0.2.0/graphhopper/graphhopper
$ ./graphhopper.sh import england-20151215.osm.pbf
./graphhopper.sh: line 2: $'\r': command not found
./graphhopper.sh: line 25: syntax error near unexpected token `$'{\r''
'/graphhopper.sh: line 25: `function printUsage {
I note some files are named differently and the file content is different between version 0.1.7 and 0.2.0, as can be seen in my two attachments (in case this is relevant)

2. GraphHopper Quickstart: I ran this as laid out here: https://github.com/graphhopper/graphhopper/blob/master/docs/web/quickstart.md.  The operation completed as it should with the final statement, "Started server at HTTP 8989" and a *.osm-gh folder with its content was created.  I placed the folder in Locus>mapsVector and selected it in Locus Map - add-on GraphHopper.  I opened Locus Map and tapped the 'Navigate' tab but received the message, "Unfortunately, Locus Pro has stopped" after the 'SELECT LOCATION' box appeared very briefly.
I note some files are different and file sizes of what I created here are significantly smaller compared with the 'england.osm-gh' I downloaded from menion's site, as can be seen in my two attachments (in case this is relevant).

I am not clever enough to pursue this issue and should be grateful if someone could take me forward.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: tommi on December 16, 2015, 14:18:00
ad 1): Sounds like graphhopper.sh contains carriage return characteers (\r). This could be the result of editing this file with a windows editor.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: voldapet on December 16, 2015, 17:53:54
@silvermapper
As tommi wrote the first issue is very likely caused due to wrong character in sh script. There is for example more information: https://danieladeniji.wordpress.com/2013/03/07/microsoft-windows-cygwin-error-r-command-not-found/

To your second question: have you really used the latest graphHopper.zip package for generation the routing data?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: silvermapper on December 16, 2015, 18:23:51
tommi
I compared the text of the graphhopper.sh file in menion's versions 0.1.7 and 0.2.0.  It was continuous in 0.1.7 but separated into lines in 0.2.0 which confirms what you wrote, perhaps.  I could not see significant differences in the text content, however.  I decided to use graphhopper.sh version 0.1.7 file in place of graphhopper.sh in version 0.2.0, everything else being 0.2.0.  It is successful, so far as I can tell.  The command ran to completion and created a new *.osm-gh file that is accepted by Locus Map.
I thank you for helping me to progress to a solution.
petr
I used graphhopper-web-0.5.0-bin.zip from https://oss.sonatype.org/content/groups/public/com/graphhopper/graphhopper-web/0.5.0/.
Even though I appear to have had success using menion's 0.2.0 generator from what I wrote above, I should like to make this method work, also.
I thank you for your interest and hope you can help further.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: poutnikl on December 16, 2015, 22:25:45
Quote from: tommi on December 16, 2015, 14:18:00
ad 1): Sounds like graphhopper.sh contains carriage return characteers (\r). This could be the result of editing this file with a windows editor.
Or rather being saved with Windows line breaks,
as good Windows editors support Windows, UNIX  or even ( said old ) Mac way of line breaks,  like e.g. Notepad++.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: silvermapper on December 17, 2015, 13:00:20
petr
I referred to the link you kindly provided regarding the structure of the graphhopper.sh file.  I downloaded Notepad++ and carried out the instructions in the link.  It worked!  Furthermore, with the aid of the Compare plugin, I was able to determine there was very little difference between the 0.1.7 and 0.2.0 graphhopper.sh files.
I thank you, and post this reply for the further reason it might be of use to others.
Bob
Title: Re: Offline navigation - GraphHopper - preparation
Post by: voldapet on December 17, 2015, 13:44:20
Great, thank you for feedback.
I guess that graphhopper 0.5.0 you have downloaded is the correct. However I suggest to use combination of plugin and generator that is available at https://drive.google.com/folderview?id=0B7v_sPhHE6RgOUtXajZHVk9BSVU&usp=sharing&tid=0B7v_sPhHE6RgfjJZbEtsS1VnSWRMTDZUZGw3TlN4WTZLMHVUbTUtUGwtVUFvVlFVWlN6MDA
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Haggi on February 16, 2016, 12:41:46
Spotted this: -May be in near future we'll see much more... when is near future and what are we gonna see?  ;D

Ref: http://www.locusmap.eu/locus-map-can-navigate-offline/ (http://www.locusmap.eu/locus-map-can-navigate-offline/)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: tommi on February 16, 2016, 22:09:00
@Locus-Team: GraphHopper 0.6.0 was released some days ago. Could we get an update of the Locus plugin?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: devo on February 17, 2016, 16:21:20
Im trying to get Graphhopper working... on Android 5 it works fine.
On Samsung S5 Android 6 (cyanogenmod 13) I get an error: No Content... But Graphhopper data to Storage... (see screenshot)
(http://s27.postimg.org/40nzz0333/Screenshot_20160217_003436.jpg) (http://postimg.org/image/40nzz0333/) . (http://s27.postimg.org/pcvhwon1b/Screenshot_20160217_003450.jpg) (http://postimg.org/image/pcvhwon1b/) . (http://s27.postimg.org/7ljvi87mn/Screenshot_20160217_003520.jpg) (http://postimg.org/image/7ljvi87mn/)

Any Idea???
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on February 22, 2016, 13:25:51
@tommi: as I see, there are no serious changes in new version. But I would like to generate new data as well, so hope ...

@devo: hard to say. Do you have graphopper data next to vector maps in correct folder?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: devo on February 22, 2016, 13:29:07
menion, thanks for your answer... I think so (see screenshots)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Bucky Kid on May 27, 2016, 16:53:06
Quote from: tommi on February 16, 2016, 22:09:00
@Locus-Team: GraphHopper 0.6.0 was released some days ago. Could we get an update of the Locus plugin?

+1

...+ wish to handle SRTM weights in future addon versions if possible.
Now I'm getting strange error if graph.elevation.provider=srtm is used:

(http://i.imgur.com/ABSXroS.png)

There's a bike profile which counts into segment weight also elevation profile (brilliant idea)

graph.flagEncoders=car|turnCosts=true,bike2,mtb,foot
graph.elevation.provider=srtm
osmreader.bytesForFlags=8
Title: Re: Offline navigation - GraphHopper - preparation
Post by: tigus on August 19, 2016, 19:06:49
Hello 0.7 version available from June.
You now have two profiles of "walking". A quick for the fastest way to do walking even main streets with sideways on either side and one hike that prioritizes safety and tourist attractions (as I understood forum).
I know Menion is making a great effort to integrate BRrouter, but GraphHopper is also a good tool.
Consultation, why is limited to 2 the number of intermediate points?
Greetings.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: pelsta on September 28, 2016, 20:58:19
Hi,
I have created a little .bat file to generate routing files for Locus GraphHopper in Windows.


set NAME=slaskie
set FILE=%NAME%.pbf
set JAVA_OPTS=-Xmx1250M
set GH_CLASS=com.graphhopper.tools.Import
set CONFIG=config.properties
rem GH_IMPORT_OPTS=?
set GRAPH=%NAME%-gh
set JAR=tools\target\graphhopper-tools-0.5.0-jar-with-dependencies.jar

java %JAVA_OPTS% -cp %JAR% %GH_CLASS% config=%CONFIG% %GH_IMPORT_OPTS% graph.location="%GRAPH%" osmreader.osm="%FILE%"

pause

Title: Re: Offline navigation - GraphHopper - preparation
Post by: pelsta on March 17, 2017, 09:24:41
Hi,

Will there be a new version of the generator for generating GraphHopper routing files, compatible with GH add-on 0.3 - based v0.7.apk ?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: silvermapper on May 28, 2017, 16:37:42
I have encouraged my son to use Locus Map and OSM mapping on his Samsung 'phone.  I use the Locus Map - add-on GraphHopper for my navigation.  I have installed the GH addon 0.2 - based v0.5.apk to his 'phone successfully.  I have copied my own england.osm-gh data (folder containing seven files) to Locus/mapsVector on his 'phone, too, as I have done with updated data many times to my own 'phone. Yet the add-on states, "No content".  I have carried out the same procedure successfully to my wife's Moto G 'phone, previously.  I wonder where a problem might lie?
NOTE: I see this issue raised in Reply #179 by devo on February 17, 2016 without a conclusion, it seems.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: tigus on June 30, 2017, 15:38:39
Hi good day.
Anything new with updating the GraphHopper plugin? Not long ago, version 0.9 was released.
Greetings.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on July 25, 2017, 13:31:02
GraphHopper add-on & generated data updated to latest GH version 0.9.0

More (mainly links to download) in first post.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Bucky Kid on July 25, 2017, 14:08:41
Thanks for update.

I see the routing data are compiled only with base profiles.
Does the add-on support profiles with elevation data?
If so, I want to try generate more versatile data.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on July 25, 2017, 14:11:49
Suggest to try it. What add-on offer in Locus is based on content of files. So yes, it should be supported. If there will be any problem, let me know (+ give me some generated sample data).

Only what is currently needed, to disable weighting as mentioned in config.properties file.

EDIT: ah sorry!! bike2 flag encoder is currently not support. If you generate me some sample data, I'll test it and add it ;).
Title: Re: Offline navigation - GraphHopper - preparation
Post by: pelsta on July 25, 2017, 17:05:36
Quote from: menion on July 25, 2017, 13:31:02
GraphHopper add-on & generated data updated to latest GH version 0.9.0

More (mainly links to download) in first post.

I can't find generator now.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on July 25, 2017, 17:11:39
Ah sorry. Whole add-on & data are based on version 0.9 , so feel free to grab required version from public GraphHopper repository: https://github.com/graphhopper/graphhopper/tree/0.9 . On our server is provided only Android APK file + our configuration we used to generate data + generated world files.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Bucky Kid on July 25, 2017, 17:18:00
Hello menion, as I expected the addon doesn't handle elevation data so bike2 profile can't be used to generate data. I get the error toast 'Configured dimension (2) is not equal to dimension of loaded graph (3)'
You can test the behaviour with bike2 routing data here:
https://drive.google.com/file/d/0By0QjFcdxojocnRZN2Q5VFJTb0E/view?usp=sharing (https://drive.google.com/file/d/0By0QjFcdxojocnRZN2Q5VFJTb0E/view?usp=sharing)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on July 25, 2017, 20:36:51
Oki thanks!

Try new AddonGraphHopper_12_0.4.1_release.apk version (in same directory as previous), it should work now.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Bucky Kid 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
Title: Re: Offline navigation - GraphHopper - preparation
Post by: srtie4k 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?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion 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.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: srtie4k 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.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: 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 (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
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion 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.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: 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 (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?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Bucky Kid on July 27, 2017, 10:28:05
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 (https://maven.apache.org/download.cgi) (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).
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion 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.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: srtie4k on July 27, 2017, 18:39:31
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 (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).
Title: Re: Offline navigation - GraphHopper - preparation
Post by: poutnikl 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 ?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Bucky Kid on July 28, 2017, 08:34:20
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
Title: Re: Offline navigation - GraphHopper - preparation
Post by: poutnikl on July 28, 2017, 08:48:38
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 ?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Bucky Kid 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)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: poutnikl 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.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion 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.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: 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.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: 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.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: poutnikl on July 28, 2017, 14:00:08
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/ (http://extract.bbbike.org/) one can let generated a custom area in PBF format.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: poutnikl on July 28, 2017, 14:10:15
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.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: srtie4k 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.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion 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.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: tigus 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.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: silvermapper 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 ?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: pelsta 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:

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).
Title: Re: Offline navigation - GraphHopper - preparation
Post by: uatschitchun 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 :-)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: john_percy 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

Title: Re: Offline navigation - GraphHopper - preparation
Post by: Bucky Kid on February 23, 2018, 14:41:23
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.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: TrulloF on February 24, 2018, 00:29:53
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?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: 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? 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.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Bucky Kid on February 24, 2018, 13:40:04
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 (https://drive.google.com/open?id=1rwnMx3RlRIdMZKGbOExtj4dR85MOt4ti)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: TrulloF on February 25, 2018, 11:56:04
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.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Bucky Kid on February 26, 2018, 13:45:32
graphHopper 0.11 is now the snapshot
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on February 26, 2018, 15:46:34
Oki guys, hopefully I understand.
Try new generated plugin ( https://github.com/asamm/locus-addon-graphhopper/releases/tag/0.5 ), with your latest routing data. Should work.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Bucky Kid on February 26, 2018, 16:14:55
Just tested and it works as expected
Title: Re: Offline navigation - GraphHopper - preparation
Post by: TrulloF on February 27, 2018, 16:39:52
Yes. I can confirm it works with routing data created with latest 0.10 RC1 (didn't test 0.11 nightly yet).
Title: Re: Offline navigation - GraphHopper - preparation
Post by: develar on June 10, 2018, 19:53:17
Thanks a lot for add-on.

My PR https://github.com/asamm/locus-addon-graphhopper/pull/1 to update GH to 0.11.0-pre1 is merged, thanks (updated to 0.10 because it is latest release).

GH vs Brouter:

1) better routes (at least for racing bike).
2) much, much faster. Instant result (of course, if contraction hierarchies (CH) were prepared for routing data).
3) GH is everywhere - Komoot uses GH, Locus uses online GH API. So, you get nearly the same route regardless of online status.

@menion Could you please add note to first topic about recommended (I would say even required) options to build routing data:

```
  graph.flag_encoders: bike2,racingbike,mtb,hike
  graph.bytes_for_flags: 8
  graph.elevation.provider: cgiar
```

(add `car|turn_costs=true` if need car routing)

(`prepare.ch.weightings: fastest` is set by default, should be not set to no)

I shared correct and up to date routing data for Germany+Austria+Switzerland (dach osm map) (keep in mind that GH doesn't support multiple files (https://github.com/graphhopper/graphhopper/issues/293), so, if you need to cross borders, you have to use not country routing data, but some merged) — https://github.com/develar/gh-routing-data/blob/master/README.md#germany-austria-and-switzerland

Route calculation time is instant even for large distance with prepared CH. But size of routing data... (e.g. shortcuts_fastest_bike2 for DASH 929MB). Maybe a new " landmark algorithm (https://www.graphhopper.com/blog/2017/08/14/flexible-routing-15-times-faster/)" is an option, but "Still the speed of contraction hierarchies is ~10 times faster on average". In any case SD card is cheap and modern phones have enough internal space in any case.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: develar on June 14, 2018, 20:56:53
I published locus action files to simplify routing data installing and updating — https://graphhopper.develar.org As for openandromaps, now you can simply click "Locus" link to install or update.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: john_percy on June 15, 2018, 08:19:26
For me, Graphhopper online in Locus provides six options for mode of travel, including car, while the offline version provides four, with no car mode.
Is this intentional?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: develar on June 15, 2018, 14:27:15
> while the offline version provides four, with no car mode

@ john_percy  Please see "Which vehicles are supported?"  https://graphhopper.develar.org/#maps

> Is this intentional?

Mode list depends on supported vehicles in a routing graph. I decided to not support car (for car probably better to use another app) and foot (hike is enough) to reduce size of graph. If you need "car", I can add it (or as separate files or include into graph if size will be acceptable).
Title: Re: Offline navigation - GraphHopper - preparation
Post by: john_percy on June 15, 2018, 15:13:45
Thanks for the explanation. Personally I find access to offline routing for cars invaluable. There are times when I need car routing and there is no mobile signal.

As to which of Brouter and Graphhopper is best for offline car routing, I don't know!


Title: Re: Offline navigation - GraphHopper - preparation
Post by: develar on June 16, 2018, 08:39:22
@john_percy I will add CH data to support car mode, it seems as separate graph routing data because of https://github.com/graphhopper/graphhopper/issues/1398
Title: Re: Offline navigation - GraphHopper - preparation
Post by: tannenzäpfle on June 18, 2018, 07:58:29
Quote from: develar on June 14, 2018, 20:56:53
I published locus action files to simplify routing data installing and updating — https://graphhopper.develar.org As for openandromaps, now you can simply click "Locus" link to install or update.

Hello,
when downloading d.ch-at I receive always a fault report as per enclosed screen-shot. I have tried on two separate tablets and with different Internet connections.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: develar on June 18, 2018, 09:24:04
@john_percy Car routing with turn restrictions is not possible at the moment — https://github.com/graphhopper/graphhopper/issues/1401

Without discussion with GraphHopper developers I don't want to publish car routing using CH because I think that turn restrictions (https://github.com/graphhopper/graphhopper/blob/master/docs/core/turn-restrictions.md) is very important. If will be confirmed that landmarks algo is very slow and it is not possible to speed up on mobile, CH will be published with a warning that  turn restrictions not supported (well, you have to always follow actual road signs, but people are people).
Title: Re: Offline navigation - GraphHopper - preparation
Post by: develar on June 18, 2018, 13:07:32
It is Locus bug, I have filed http://help.locusmap.eu/topic/locus-action-extract-doesnt-support-large-files

As workaround, please download and extract manually (btw, it will be cool if Locus can download in parallel, as https://play.google.com/store/apps/details?id=com.dv.adm&hl=en does).

Routing data only for Baern/Austria/CZ is available to avoid the whole Germany.

PS. To avoid polluting this topic, I suggest report bugs about routing data to https://github.com/develar/gh-routing-data/issues
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Bucky Kid on June 18, 2018, 13:16:55
Is it somehow possible to generate single custom .pbf file based on own region in order to seamlessly cross the borders?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: develar on June 18, 2018, 13:49:19
> generate single custom .pbf file based on own region in order to seamlessly cross the borders?

You can specify required for you countries and I will add specified region to https://graphhopper.develar.org

In general, you need to draw wanted region using http://geojson.io, download europe.pbf from some public  source (http://download.geofabrik.de/index.html),  and then

```
osmium extract --overwrite --config=extracts.json --strategy=smart europe-latest.osm.pbf
```

where extracts.json something like https://github.com/develar/gh-routing-data/blob/master/configs/extracts.json

and then build graph for result pbf file.

Since Locus is so awesome, I think it is not good that users need to do such low-level tasks to enjoy offline navigation, that's why I suggest you to file issue to https://github.com/develar/gh-routing-data/issues and I will add wanted region to provided list (main problem not first import, but keep it up to date).
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on June 25, 2018, 01:45:15
@develar
firstly, really nice work. I'm sure, many users appreciate it.

Just published version 0.7 of GH add-on.
Main change: using latest stable GH API 0.10
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Bucky Kid on June 25, 2018, 07:20:16
@menion: I can't find the updated version, is it still here?
https://nas.asamm.com/share.cgi?ssid=0GmHJnN (https://nas.asamm.com/share.cgi?ssid=0GmHJnN)

@develar: thanks for the method, my region is specific and not aligned exactly on country borders, so there will be probably a small target, and I use different set of wehicles
Title: Re: Offline navigation - GraphHopper - preparation
Post by: develar on June 25, 2018, 08:15:55
@Bucky Kid Latest release on GitHub https://github.com/asamm/locus-addon-graphhopper/releases/latest
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on June 25, 2018, 08:51:52
Ah thanks, I've updated the first post and hope it is ok for you @develar, that I pointed users directly on your web server.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Bucky Kid on June 25, 2018, 19:08:31
Thanks develar for updated link, do you know where to get Windows binaries for osmium tool?
I am unable to compile from sources.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: develar on June 25, 2018, 19:16:52
@Bucky Kid Please see https://ci.appveyor.com/api/buildjobs/skx61j610842y80u/artifacts/osmium_Release_x64.zip

Issue https://github.com/osmcode/osmium-tool/issues/59 is opened. I don't test it (I use macOS).

> I am unable to compile from sources.

Process is not easy. That's why I created http://graphhopper.develar.org/ and any user can request any region to be added to avoid low-level things.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Bucky Kid on June 26, 2018, 11:47:50
Quote from: develar on June 18, 2018, 13:49:19osmium extract --overwrite --config=extracts.json --strategy=smart europe-latest.osm.pbf
Finally got everything to work, but this is not working, instead I had to uise

osmium extract --polygon extracts.json ....

or also works

osmium merge -o my-europe.osm.pbf country1-latest.osm.pbf country2-latest.osm.pbf country3-latest.osm.pbf ...

however anyway I brush up against problem of memory limitation so wasn't able to generate combined routing data even only for 3 countries, so seamless routing will only be possible by adding support for automatic region selection in graphopper app.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: develar on June 26, 2018, 12:07:30
@Bucky Kid

> however anyway I brush up against problem of memory limitation so wasn't able to generate combined routing data even only for 3 countries, so seamless routing will only be possible by adding support for automatic region selection in graphopper app.

`export JAVA_OPTS="-Xmx15g -Xms10g -XX:+UseG1GC"`

where `15g` it is `available RAM - 1GB` (1GB for system). Change `-Xms10g`  if you don't have 10GB.

and if your machine doesn't have enough memory (estimate: num of encoders * size of input map), use MMAP instead of RAM_STORE.

Or you can stop wasting your time and file issue to https://github.com/develar/gh-routing-data/issues/new ;)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: develar on June 26, 2018, 12:12:35
About memory on mobile — Locus add-on correctly set MMAP instead of RAM_STORE. It works very fast because provided graphs by http://graphhopper.develar.org/ are sorted. Yes, there is penalty, but insignificant — you can build europe wide route (900 km) in _several seconds_. The only downside of large regions — disk space (e.g. de-at-ch takes 5GB). But SD cards are cheap nowadays :)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Bucky Kid on July 02, 2018, 06:36:21
Thanks for all the input. Combined region now compiles successfully. There remains one issue and that is when I use sorting (graph.do_sort), the compilation ends up with error

Exception in thread "main" java.lang.AssertionError: The turn cost storage must be initialized only once.
        at com.graphhopper.storage.TurnCostExtension.init(TurnCostExtension.java:60)
        at com.graphhopper.storage.BaseGraph.<init>(BaseGraph.java:144)
        at com.graphhopper.storage.GraphHopperStorage.<init>(GraphHopperStorage.java:83)
        at com.graphhopper.util.GHUtility.newStorage(GHUtility.java:281)
        at com.graphhopper.GraphHopper.postProcessing(GraphHopper.java:854)
        at com.graphhopper.GraphHopper.process(GraphHopper.java:671)
        at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:640)
        at com.graphhopper.tools.Import.main(Import.java:50)


If I turn off turncosts for calculation, the sorted data compile, so the two features probably cannot be used concurrently
Title: Re: Offline navigation - GraphHopper - preparation
Post by: develar on July 02, 2018, 08:23:50
You cannot use turn costs for now. https://github.com/graphhopper/graphhopper/issues/1401 I didn't yet publish PR to Locus add-on.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Andy Tover on September 18, 2018, 00:19:01
Is the GraphHopper offline routing "project" dead? None of the links on develar.org for any of the routing files work. Any other options for offline routing at this point besides BRouter?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on September 21, 2018, 18:54:12
Hello,
should not be, To be true, do not know why data from @develar server are not downloadable anymore.

You still may download add-on's APK and compile routing data on your own.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Bucky Kid on September 24, 2018, 08:39:53
Quote from: Andy Tover on September 18, 2018, 00:19:01
Is the GraphHopper offline routing "project" dead?
No it is not. 0.12-SNAPSHOT is current version.
I'd be interested if turn costs and graph sorting collision was already sorted out.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: john_percy on September 24, 2018, 13:34:28
Graphhopper hike and bike routing data are available once again at https://graphhopper.develar.org/ .
Car routing data is not currently available as it does not work satisfactorily (I presume).
Thanks to develar.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: MH100181 on October 26, 2018, 02:48:30
Hi. And you can link to 0.2.0 data generator provided by Minion
Title: Re: Offline navigation - GraphHopper - preparation
Post by: john_percy on December 22, 2018, 12:37:28
Quote from: john_percy on September 24, 2018, 13:34:28
Car routing data is not currently available as it does not work satisfactorily (I presume).
Car routing data is now available for download again at https://graphhopper.develar.org/#maps (as in the first post in this thread) along with
This seems to work fine with the Locus add on (link in the first post again), though avoid highways/tolls/unpaved road options are not available.
Thanks again to develar.

Title: Re: Offline navigation - GraphHopper - preparation
Post by: pelsta on December 22, 2018, 17:43:56
Wow GraphHopper is very, very, very fast now!
Good job!
Thanks for the Christmas gift.
Waiting for the version with avoid highways/tolls/unpaved road options.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: srtie4k on January 24, 2019, 17:19:52
I'm less interested in hike/bike/mtb profiles and really just want car, especially to save space.

Have the sorting and turn costs issues been worked out? Are the current routing profiles by develar generated using the latest graphhopper master, or 0.12 snapshot? I see that the config file has changed in the latest master release.

I'm also very interested in motorcycle profile. Anyone know if this works offline?

If anyone has tips on these current profiles and which version of graphhopper to use to generate, it would be greatly appreciated.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: ThomasD. on January 26, 2019, 16:15:54
I can´t get GH to work. I have installed AddonGraphHopper_16_0.7_release.apk and GH data via Locus action button. When I start the Addon, it just shows me the content of the data directory (here: germany.osm). I can click on it, but I can´t select it in any way.

In Locus I can select GH as offline service, but there are no routing profiles offered to me (if I click on the little symbol with the three lines on the right site) as in GH online or BRouter.
These routing profiles are missing in the route planner, too.

If I select a crossing on the map and use it at navigation destination from the flyout, I get the error popup: Graphhopper cannot load notes.

I don´t know if it´s important, but I store all my maps on external SD. GH data are correctly copied to the external directory defined in settings.

Any hint please what to do?

Title: Re: Offline navigation - GraphHopper - preparation
Post by: john_percy on January 28, 2019, 12:04:42
I'll attempt to show what I get, though the forum doesn't seem to like images at present and I've had to collect them as attachments at the end of this post.
Quote from: ThomasD. on January 26, 2019, 16:15:54
I can´t get GH to work. I have installed AddonGraphHopper_16_0.7_release.apk and GH data via Locus action button. When I start the Addon, it just shows me the content of the data directory (here: germany.osm). I can click on it, but I can´t select it in any way.
This is correct behaviour. If you had routing data for more than one region you could select the appropriate region here.
Quote from: ThomasD. on January 26, 2019, 16:15:54
In Locus I can select GH as offline service, but there are no routing profiles offered to me (if I click on the little symbol with the three lines on the right site) as in GH online or BRouter.
If you are referring to the "sliders" icon, I get different results with GraphHopper online & offline here. GH online gives options for avoid highways, avoid tolls, avoid ferries. GraphHopper offline just gives the option for the data file, just as when running the addon directly.
Quote from: ThomasD. on January 26, 2019, 16:15:54
These routing profiles are missing in the route planner, too.
You should get a choice of profiles when you select Navigation. With GraphHopper online they are: Car, Cycle, MTB, racing (bike), Walk, Hike. With GraphHopper offline they are Fast (car). Fast (bike), MTB, Racing (bike), Hike.
[/quote]
Quote from: ThomasD. on January 26, 2019, 16:15:54
If I select a crossing on the map and use it at navigation destination from the flyout, I get the error popup: Graphhopper cannot load notes.
That sounds like an error. have you tried reinstalling the addon and data?
Quote from: ThomasD. on January 26, 2019, 16:15:54
I don´t know if it´s important, but I store all my maps on external SD. GH data are correctly copied to the external directory defined in settings.
External SD cards are notoriously difficult in Androids. Can you try moving the data to internal memory?
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Lance on February 17, 2019, 16:10:05
Hello,  I've read the whole topic but can't figure it out, can you explain in detail how to do this:

How to generate routing files
- Download the raw openstreetmap file (pbf files)
- Execute ./graphhopper.sh import <your-osm-file>. This creates the routing data


where can I download raw openstreetmap file? how to create the routing file what should I use to create it, and once I get it where should I place it? Sorry for newbs questions
Title: Re: Offline navigation - GraphHopper - preparation
Post by: john_percy on February 17, 2019, 16:19:05
Follow the instructions above the line in the first post. Ignore everything below the horizontal line. There is no need to generate your own routing data as you can download and install the two files you need directly from the two download links given.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Bucky Kid on March 12, 2019, 14:04:40
Menion, the addon needs update.
Just compiled a routing data using 0.13-SNAPSHOT and the structure isn't accepted (as I expected)

________________________
Sent from my phone using Tapatalk

Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on March 13, 2019, 14:21:14
Did you try it with 0.12 version?
Update add-on to SNAPSHOT version is not an ideal solution, I would rather wait to valid production-ready 0.13 version.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Bucky Kid on March 13, 2019, 14:29:07
With 0.12, the addon works perfectly. But now on github version 0.13 is only available. If it's not yet final, then I'll wait. The structure of the iffline data may however be final, may karrussel from gH project know.

________________________
Sent from my phone using Tapatalk
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on January 24, 2020, 20:53:19
Thanks to the huge help of @develar , the add-on is back online :)

Links to the add-on APK file and also routing data are in the first posts. Enjoy it.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: john_percy on January 25, 2020, 00:16:39
If like to know if anyone else is having trouble getting this to work. I've downloaded the new apk and the latest data for Great Britain. I can get navigation to work for fast cycle and racing cycle but not for the others. I get T: problem with service on orange toast.
What's more the navigate button seems to need to be tapped twice.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: develar on February 03, 2020, 20:11:33
@john_percy Looks like notifications about new messages are not delivered to me :) Better to file issue on GitHub https://github.com/develar/gh-routing-data/issues

> for fast cycle and racing cycle but not for the others. I get T: problem with service on orange toast.

Yes, I confirm that. For the same route `bike` works, but doesn't work for `hike`.
I fixed it (at least, works for me now), please see  https://github.com/asamm/locus-addon-graphhopper/pull/5
Title: Re: Offline navigation - GraphHopper - preparation
Post by: john_percy on February 04, 2020, 23:54:00
Hmm. Won't install for me when I either install from the zip or extract and install the apk.

Sent from my moto g(6) plus using Tapatalk

Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on February 06, 2020, 10:19:25
Hi John, others.

I've just generated on the GitHub new version 0.9 . @develar also very quickly generated new data for this version so please re-download necessary areas from the web: https://graphhopper.develar.org/ .

I've tested a new APK version & new data and seems to work correctly for all possible routing profiles. And have to say, that compare to the BRouter, this is sooooo fast, unbelievable :)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: john_percy on February 06, 2020, 10:57:14
Well it's really odd.
I've downloaded the 0.9 apk and the 0.9 data (have to manually select that option).
Attempting to route
a) select eg fast car
b) after first tap of the blue button nothing happens
c) after second tap gives orange toast as before
d) select eg fast bike
e) select eg fast car
f) tap blue button: nothing happens
g) tap blue button: routing works!


Sent from my moto g(6) plus using Tapatalk

Title: Re: Offline navigation - GraphHopper - preparation
Post by: john_percy on February 06, 2020, 11:33:28
@menion
Ignoring double tap issue, none of the travel modes (fast car, fast bike, mtb, racing, hike) work first time, whether I just accept the default or select a different mode. After this failure (*without returning to the map screen*), you can either select a different mode or select a different mode and then reselect the previous mode: routing then works.
Edit: 1. In latest beta, double tap issue is resolved.
2. Second sentence above should now read: After this failure (without returning to the map screen), you can either select a different mode or leave the previous mode selected: click on blue button, routing then works.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: develar on February 10, 2020, 08:58:23
0.9 still has issues with "problem with service".

I planned route using "plan route". Saved track, and then navigate.

But when I cut down the route, navigation stopped work (no new voice navigation). I invoke "recalculate", and got "problem with service on orange toast." (several times, no luck to make it working).

The only solution was to change navigation provider to graphhopper online :(
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on February 15, 2020, 19:40:25
Hi, after some changes, I've completely included GraphHopper add-on in the latest Beta version.
May you or John give it a try to verify that the problem is or isn't in some kind of cross-app communication/battery optimization? Thanks guys.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: john_percy on February 15, 2020, 20:59:58
At first sight this appears to now be working fine, though Locus Free icon appears twice in the app drawer, and one of them opens the graphhopper set data page.


Sent from my moto g(6) plus using Tapatalk

Title: Re: Offline navigation - GraphHopper - preparation
Post by: john_percy on February 16, 2020, 14:24:38
At second sight I discovered the routing engine being used was graphhopper online rather than the new graphhopper internal. Graphhopper internal fails completely for me, as in the main thread for the latest version.

Sent from my moto g(6) plus using Tapatalk

Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on February 16, 2020, 18:43:34
Ah damn, so the problem is not in separation of the feature into two apps, but in the method, how apps communicate. Oki, thanks!
Title: Re: Offline navigation - GraphHopper - preparation
Post by: john_percy on February 16, 2020, 18:50:08
The error message is totally different this time. With the previous version, routing worked the second time. The message the first time was "T: problem with service"
With this version, I get "Routing service set incorrectly".(https://uploads.tapatalk-cdn.com/20200216/2e3dda10c8180ac899ab2fb659dec75d.jpg)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: john_percy on February 18, 2020, 09:16:52
New beta: back to "Problem with service" orange toast on first tap on circular blue navigation button, ok on second tap.

Sent from my moto g(6) plus using Tapatalk
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on February 18, 2020, 12:58:06
Thanks for tests John. Same issue (hope it's same) happens to Michal and I think I've found a reason for it.
Meanwhile, you are testing it in Route planner with same result right? Give it a try once more, but this time, try to disable GPS in Locus Map. It may help. Thanks.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: john_percy on February 18, 2020, 13:12:03
1. Seems to work OK in Route Planner mode.
2. My testing recently had been with the pop up "Navigate to selected point". If I navigate between two fixed points (ie not from GPS current position) it finds a route ok, *then* shows orange toast as before. That's with GPS on. I guess with GPS off it won't show that toast as it seems to be checking actual position. (However I can't see how to turn GPS off in the app.)

Sent from my moto g(6) plus using Tapatalk

Title: Re: Offline navigation - GraphHopper - preparation
Post by: balloni55 on February 20, 2020, 20:47:58
Quote from: john_percy on February 18, 2020, 09:16:52
New beta: back to "Problem with service" orange toast on first tap on circular blue navigation button, ok on second tap.
furthermore with V 3.44.0
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on February 20, 2020, 21:55:50
Thanks for the test balloni. Unfortunately, I still do not know why this happens.
I will have to test on some more devices (involve family) to find out any, that has same issue as you describe here. Next week ...
Title: Re: Offline navigation - GraphHopper - preparation
Post by: john_percy on February 22, 2020, 12:58:55
Awaiting next beta for further tests...

Sent from my moto g(6) plus using Tapatalk

Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on April 07, 2020, 12:29:21
For some of you with working offline GraphHopper solution, new version 0.10: https://github.com/asamm/locus-addon-graphhopper/releases/tag/0.10

Needs new routing data from @develar web page (please select "GraphHopper pre31 from the selection).
Title: Re: Offline navigation - GraphHopper - preparation
Post by: nIgel on July 06, 2020, 14:30:01
Gave it a try.
First had some problems with the offroad data, downloading the large German Database via PC and copying it into the relevant directory didn't work but after I downloaded it via Locus everything worked fine and really smooth.

Great one, thanks for implementing!
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Baikan4ik on November 13, 2020, 14:10:28
Hello.
followed the instructions completely, but when building a route where the start and end point are selected, different settings, an error appears "Service for calculating routes setuped incorrectly: load of types" and sometimes addon (latest) fall with error

Sony Xperia Z3 (Android 10, Locus Map Pro 3.49.0)
Title: Re: Offline navigation - GraphHopper - preparation
Post by: Menion on November 16, 2020, 06:50:46
Hello,
I've just updated the info in the first post. Work on this add-on was terminated and I personally won't do any updates to maintain compatibility of the add-on & latest generated routing data (which seems to be your current problem). Thanks for understanding.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: freischneider on November 16, 2020, 08:24:58
it is best to use BRouter for navigation and routing