Locus Map - forum

Development => Discussion/New 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,

new version of Locus GraphHopper add-on: v0.2 (GH addon 0.2 - based v0.5.apk)

Requirements: Locus Map 3.9.3.3+

(if exists) Delete the old Locus/graphhopper folder - (is not needed anymore)

Download the APK file from HERE (https://drive.google.com/folderview?id=0B7v_sPhHE6RgfjJZbEtsS1VnSWRMTDZUZGw3TlN4WTZLMHVUbTUtUGwtVUFvVlFVWlN6MDA&usp=sharing) .../data/GH addon xxx.apk
copy the apk file to your device and install.

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

Extract zip to Locus/mapsVector/
(Planned solution is that routing data will be part of "vector maps" download over store.
So best is to place these files next to your vector maps in Locus/mapsVector directory.
example: .../Locus/mapsVector/yourcountry.osm-gh)

In the GraphHopper Add-on choose which file you want to use.

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



Advanced users: in download directory is also a generator, so feel free to use it for generating own GraphHopper routing files. All options/types should work correctly now.

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

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

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

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

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
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
Quote
Routing 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
... 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
... 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
... 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
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
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
...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

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
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
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: menion
Data 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
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
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
Quote
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
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
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: 0709 on July 03, 2015, 15:50:39
The map: xxx.osm-gh must be writable ?  As this seems to work on external sd according to: http://forum.locusmap.eu/index.php?topic=4661.msg37833#msg37833
Works on internal in Kit Kat but does not work on unrooted KitKat on external SD. Gh starts up but then no menu: choose transport. (Fast bike, short etc).
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
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: 0709 on July 03, 2015, 18:23:58
On the THL 4000 (rooted KitKat) works fine on internal and external SD. And I had no one crash during usage.  To test I went on several occasions out of the navigation track. Setting: out of track warning (1x beep) 75 meter, and autorecalculation 100 meter. Together with auto display on, very fine behaviour for non strict A->B autorouted navigation ;-)
Confirm is ok on external sd with 0.1.7 also for unrooted Kit Kat !
Willy.
Title: Re: Offline navigation - GraphHopper - preparation
Post by: tommi on July 03, 2015, 18:26:45
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!

Code: [Select]
$ 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
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.
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
Quote
is there a particular place to which the .apk file should be
no - and after install the apk - you can throw it in the trash



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
Quote
I 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
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
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:
Code: [Select]
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
Code: [Select]
git checkout 0.5
./graphhopper.sh clean
./graphhopper.sh import your-area.pbf

Ends on this error:
Code: [Select]
[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
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
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.

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
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:
Quote
The 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
Graphhopper 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
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
@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)

Code: [Select]
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.

Code: [Select]
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 ?