Locus Map - forum

Development => Other features => Navigation & Guidance => Topic started by: gynta on April 04, 2013, 20:34:26

Title: BRouter 0.9.1
Post by: gynta on April 04, 2013, 20:34:26
This is an old outdated and closed thread!
please read new infos here:
http://forum.locusmap.eu/index.php?topic=3434.0

brouter im deutschen Forumteil :
http://forum.locusmap.eu/index.php?topic=4064.msg30995#msg30995


QuoteBRouter - Beta Version 0.9.1 - Setting up the Android App
===================================================
Choosing and Installing a Map-Tool
----------------------------------
BRouter just calculates tracks as GPX-Files, it does not display any map or give any navigation instuctions. Therefore you need a map-tool in order for BRouter to be useful.
Currently, BRouter cooperates with three different maptools, so you need to install, and get familiar with, at least one of them:

- "Locus": See <!-- m -->http://www.locusmap.eu (http://www.locusmap.eu)<!-- m --> There's a "Pro"
  Version which is ad-free and a free version with ads. You can get it from Google-Play, but for the free-version there's also an APK-Download.

Locus for example has elevation profile diagrams...
Locus ...are best used with third-party vector maps,
check <!-- m -->http://www.openandromaps.org (http://www.openandromaps.org)<!-- m --> if you consider to go for Locus...

Choosing an SD-Card Base Directory
----------------------------------
Some phones (namely those with Android 4.x) have 2 logical "SD-Cards", where the first one is internal and not an actual Card, and the second one is a an optional "external" micro-sd-card that can be taken out of the device.
If you have such a setup, make sure your map-tool uses the external sd-card to store the offline maps and other stuff.
This works by choosing an "SD-Card base directory".
Typically, the first card in mounted on "/mnt/sdcard", while the external one maybe mounted at "/mnt/sdcard/external_sd", but depending on your phone it can be some other path.

Make sure you understand the concept of the SD-Card base-directory, because the communication between BRouter and the Map-Tools requires that both are using the same base-directory.

Selecing Waypoints in your Maptool
----------------------------------
In order to calculate a route, BRouter needs to know at least a starting point and an endpoint. You specify them by creating waypoints in your map-tool.
These are called "POI"s in Locus on the map and give it a name.

Pleae specify at least a waypoint called "from" for the starting-point and another called "to" for the endpoint (lowercase! names are case-sensitive) You can use any category, as only the name is read by BRouter.

Optionally, you can specify more waypoints: 
"via1" ... "via9" to specify stop-overs
"nogo[radius] [name]" to specify a nogo-area, where radius (in Meter) is optional and defaults to 20m, and the name is also optional. So "nogo", "nogo1000", "nogo roadblock", "nogo200 badferry" are all valid nogo-waypoints.

Make sure to not create duplicates for the from, to and via-waypoints, as BRouter would complain about duplicates. For nogo-areas, duplicates are allowed.
Please specify at least the "from" and "to" wayoints before starting BRouter, because otherwise the error-messages from BRouter may be confusing.


Installing the BRouter App
--------------------------
Download the file "brouter_x_x.zip" and unpack in a directory "brouter" on the SD-Card of your Android Device. Most convenient is to attach the device (or just the sd-card) to a desktop-computer and do the unpacking there, but doing that on the device itself is also possible, provided you know the appropriate tools.

Install the BRouter-App by installing the APK-File "BRouter.apk".
For instructions how to install from an APK (in contrast to installing from Google Play), search the internet for tips.
You may need to change system configuration, some setting like "Applications->Unknown sources" depending on Android version.

The BRouter App asks for permissions to access the SD-Card and to de-activate the screen saver. Being an offline app, it does NOT ask for internet access. The drawback is that you have to install the additional resources manually.


BRouter's SD-Card Directory Structure
-------------------------------------
BRouter guesses a reasonable sd-card base directory and on first start prompts you for a base directory with it's guess as a default. You should choose the same base directory that is used by your map-tool.
On first start, BRouter will create a "brouter" subdirectory relative to that base-directory if it's not already there (becaused you created it by unpacking the zip-file, see above)
If later on you want to change the base directory, you can delete or rename the 'brouter' subfolder, so it will prompt again for a base directory. You should choose the same base directory that is used by your map-tool (OsmAnd or Locus).

So you may end up with e.g. the following directory structure
(depending on base dir):

/mnt/sdcard/brouter
/mnt/sdcard/brouter/segments2  <- put routing data files (*.rd5) here
/mnt/sdcard/brouter/profiles2   <- put lookup-table and routing profiles here
/mnt/sdcard/brouter/profiles2/lookups.dat
/mnt/sdcard/brouter/profiles2/trekking.brf
/mnt/sdcard/Locus              <- Locus's sd-card dir
/mnt/sdcard/Locus/mapitems     <- Locus's track storage

The minimum files BRouter needs to work are e.g.
/mnt/sdcard/brouter/segments2/E5_N45.rd5

But of course you can put as many routing data filesand routing profiles as you like.

Get the profiles (*.brf) and the lookup.dat from the zip-file or from:
<!-- m -->http://www.dr-brenschede.de/brouter/profiles2 (http://www.dr-brenschede.de/brouter/profiles2)<!-- m -->

And the routing data files from:
<!-- m -->http://h2096617.stratoserver.net/brouter/segments2 (http://h2096617.stratoserver.net/brouter/segments2)<!-- m -->

Routing data files are organised as 5*5 degree files, with the Filename containing the south-west corner of the square, which means:
- You want to route near West48/North37 -> get W50_N35.rd5
- You want to route near East7/North47 -> get E5_N45.rd5

From the above link you find routing data for all places in the world where OSM data is available.

Starting the BRouter Android-APP
--------------------------------
Make sure you selected "from" and "to" waypoints in your maptool as decsribed above.
Then you can start BRouter. It will read the waypoints from the map-tools database, calculate the route and store the result as "brouter0.gpx" in the map-tools track directory.
BRouter shows a graphical animation of the routing algorithm, and shows some messages on distances and ascends. The "filtered ascend" is a measure for the real hill-climbing pain, with small variations filtered out.
Then you can use your maptool to view or navigate the route.

If started once more with identical input, BRouter will store a second route broute1.gpx for the first alternative and so on.
source (and original textfile: <!-- m -->http://www.brensche.de/brouter/readme.txt (http://www.brensche.de/brouter/readme.txt)<!-- m --> - 2013 06 - from here (http://www.brensche.de/brouter/offline.html)


Conclusion:
After my first tests, here a simple demo how it can work in Locus:

# First add the function "Quick new point (http://docs.locusmap.eu/doku.php/manual:quick_new_point)" to your right panel (http://docs.locusmap.eu/doku.php/manual:set_right_panel).

# How to add some QuickPoints for brouter in Locus -> quickpoints4brouter.avi (http://www.oldboys.at/dl/locus/quickpoints4brouter.avi) (6Mb)

# Install and add brouter (http://www.brensche.de/brouter/offline.html) to your right panel. 

# How to use brouter in Locus -> brouterdemo.avi (http://www.oldboys.at/dl/locus/brouterdemo.avi) (2,5Mb)

And if you need additional -> the little iconpack (http://www.oldboys.at/dl/locus/directions.zip)  (14Kb) (copy to ..Locus/icons/...)

edit - 2013 06 04
See also the new "nogo"-function here:
<!-- l -->viewtopic.php?f=26&t=2987&start=20#p21318 (http://forum.locusmap.eu/viewtopic.php?f=26&t=2987&start=20#p21318)<!-- l -->
Title: Re: BRouter
Post by: tommi on April 04, 2013, 20:45:44
I planned to do but did not find time yet and will not find time within the next two weeks.
Title: Re: AW: BRouter
Post by: jusc on April 04, 2013, 21:07:41
Yes, I use this App. It's a bit tricky to use, but it works, as far as I can see correctly.For me it is a very good alternative solution, if there is no GSM network. But you have to download all the "Offline" routing files. It would be helpfull, if there is a "automatic" possibility for installation and configuration.
Title: Re: BRouter
Post by: sherman on April 04, 2013, 21:22:02
I have installed it about two weeks ago and I am very satisfied so far. I use the trekking profile in Prague – prefer safer way to a quicker in this city, where the whole cyclo infrastructure is messed up.

I compared the calculated route to my work with my self-explored best way and it almost matches. Today I made a trip to "unknown" and wasn't surprised in any bad way.

But you have to count on the fact the quality of the calculated route heavily depends on the quality of the underlying map source – OSM.

Although the app is not tightly integrated to Locus, it is quite easy and quick to use it – I added link to BRouter to right panel and than added shortcut to 'Quick new point' where I predefined the 'from' and 'to' points.
Title: Re: BRouter
Post by: jusc on April 12, 2013, 07:41:00
Quote from: "sherman"I added link to BRouter to right panel
:idea:  Useful hint, I never thought about this possibilty. Thank you for this.

edit
The BRouter app (http://brensche.de/brouter/offline.html (http://brensche.de/brouter/offline.html)) was updated. Now you can use stopovers or waypoints on your route. https://groups.google.com/forum/m/?from ... UP9QbXdfOM (https://groups.google.com/forum/m/?fromgroups#!topic/osm-android-bikerouting/7UP9QbXdfOM).
A usefull feature, at least in my eyes.
Thanks to Arndt for his efforts.
Title: Re: AW: BRouter
Post by: locuscycling on May 02, 2013, 20:49:51
Quote from: "jusc"But you have to download all the "Offline" routing files.
I read about BROUTER and wanted to try this app with Locus.
But it is not so clear what to do.

I understand i have to download  all files from this page //http://h2096617.stratoserver.net/brouter/segments2 and mayby all from //http://www.dr-brenschede.de/brouter/profiles2

Is it possible to download entire folder or we have to download all  ( maybe 1000) *.rd5 files separatelly.?

I remember downloading SRTM Web Ripper was very helpful but here i see no solution. Manualy it will take 10 hours  to download all routing data.
Title: Re: AW: BRouter
Post by: sherman on May 03, 2013, 09:37:10
Quote from: "locuscycling"I understand i have to download  all files from this page //http://h2096617.stratoserver.net/brouter/segments2 and mayby all from //http://www.dr-brenschede.de/brouter/profiles2

Hi, you definitely do not need to download all the .rd5 files. These are vector map data used for route calculation, so you need only those for your area. These map data are sliced to 5x5degrees tiles. So if you want route data for example for Poland, you will need these files:
E10_N45
E10_N50
E15_N45
E15_N50
E20_N45
E20_N50

As the coordinates of upper left corner of bounding box of Poland are 55.0,13.8 and lower right corner coordinates are 49.0,22.9... I hope I am right, be sure to check it again.

Anyway if you really want to download data for the whole world, there are several ways. Some of them are described here: http://www.raymond.cc/blog/how-to-downl ... te-or-ftp/ (http://www.raymond.cc/blog/how-to-download-all-files-from-a-folder-on-a-website-or-ftp/)

The profiles at http://www.dr-brenschede.de/brouter/profiles2 (http://www.dr-brenschede.de/brouter/profiles2) are preferences for route calculation – for example prefer cycling routes, penalize steep uphils, avoid highways etc. Just download them all, try to calculate routes with the same from/to points using the various profiles and see the differences in the final route.
Title: Re: BRouter
Post by: gynta on May 03, 2013, 09:47:07
Oh here is my missing thread ;)
So here my question again.

What I'm doing wrong here:
edit: videoclip removed - because it's solved...
Title: Re: BRouter
Post by: sherman on May 03, 2013, 10:06:19
Well, this seems to be a question for the author of the app. Try to ask here: https://groups.google.com/forum/?fromgr ... ikerouting (https://groups.google.com/forum/?fromgroups#!forum/osm-android-bikerouting)

I experienced a similar problem with a via point when the BRouter got in an infinite loop and was unable to calculate the route. I found out then the via point was not positioned on a way but beside or something like that. And I was not able to put it there. I had to find a bigger street nearby and put the point on it.
Title: Re: BRouter
Post by: sherman on May 03, 2013, 10:24:40
I have just tried to calculate the same route as you did in the video. I did not give me the error, but for some reason the calculated route is avoiding the part of Schulstrasse where you positioned the via point. Maybe this part of way has some tag which is forbidden in the routing profile. Or it is simply a bug.

Still, it is a question for the author of the app.
Title: Re: BRouter
Post by: jusc on May 03, 2013, 10:35:49
@gynta,
I think you put the via1 file not on a correct position exactly "on the the road".
Try to zoom in or try to put on another place near the first try.
Title: Re: BRouter
Post by: gynta on May 03, 2013, 10:49:43
Quote from: "jusc"@gynta,
I think you put the via1 file not on a correct position exactly "on the the road".
Try to zoom in or try to put on another place near the first try.
:cry: nope - zoomed to 22 in the middle of the street.
Title: Re: BRouter
Post by: jusc on May 03, 2013, 11:47:31
Does it route if you use the online route service of Cloudemade?
Title: Re: BRouter
Post by: sherman on May 03, 2013, 12:24:33
I was curious so I did try Cloudmate – no problem. So it seems to be a sort of bug in BRouter.
Title: Re: BRouter
Post by: locuscycling on May 03, 2013, 14:02:22
Thx ,,sherman''.

I don't need download all world ( all Europe is enough).

(About Locus ONLINE Route Calculation- I have the feeling that ,,Yours'' is the best at least in my Region. The calculation is quicker and ,,Yours'' se more roads (for ex mountains paths) then the other 2 .)
Title: Re: BRouter
Post by: gynta on May 03, 2013, 15:20:51
Quote from: "gynta"...What I'm doing wrong here...
Stupid mistake by me.
Missed one routing file from here:
http://h2096617.stratoserver.net/brouter/segments2/ (http://h2096617.stratoserver.net/brouter/segments2/)
because i don't sort the list - so I had overlooked the file  :roll:

edit the first post (//http://forum.locusmap.eu/viewtopic.php?f=26&t=2987&p=20521#p19990)
and add a democlip...
Title: Re: BRouter
Post by: locuscycling on May 03, 2013, 19:57:37
Can you help me?
Don't understand this app. Readme TXT is unclear for me in one particular  moment.

I already downloaded routing data ( ca 4 gb) from here //http://h2096617.stratoserver.net/brouter/segments2  and the profiles from  //http://www.dr-brenschede.de/brouter/profiles2.

Then i installed brouter.app .At the end of installation  when trying to open this app i get window like this:
[attachment=1:1m4xe2qo]screenshot2013050319331.png[/attachment:1m4xe2qo]

This is a start of my problems.

What path should i write here.( or maybe i should do  nothing) What means  ,, base dir''

Where should i copy all routing and profiles  files???  I tried few times .Once copy to brouter/profiles2  or brouter/segments2   or to locus/brouter/segments2  etc... but without succes.
I get something like this:
[attachment=0:1m4xe2qo]screenshot2013050319353.png[/attachment:1m4xe2qo]
Title: Re: AW: BRouter
Post by: jusc on May 03, 2013, 20:23:51
Do you have an external SD drive? Normally you have only to follow the proposed directory.
It's like /mnt/sdcard0 or /mnt/sdcard1.
Later you will find a directory /mnt/sdcard0/brouter with 2 subdirectories /segments2 and profiles2. Put the *. rd5 files to segments2.
Title: Re: BRouter
Post by: gynta on May 03, 2013, 20:29:25
use now a datamanager

you sholud have a brouter folder on your external sdcard.
copy your *.rd5 files to ../brouter/segments2/
copy your  *.dat files to ../brouter/profiles2/
copy lookups.dat to ../brouter/profiles2/
---
my external:
../brouter/segments2/...
../brouter/profiles2/...
../Locus/...
Title: Re: AW: BRouter
Post by: locuscycling on May 03, 2013, 20:46:33
Quote from: "jusc"Do you have an external SD drive? Normally you have only to follow the proposed directory.
(Sory if i understand not corectly.)
I have Xperia Active with MicroSDHC 32GB put in. Locus and other apps like Oruxmaps, IPbike are  installed on this card.
Maybe i should write /sdcard instead of /mnt/sdcard ???

Quote from: "gynta"use now a datamanager
you sholud have a brouter folder on your external sdcard.
copy your *.rd5 files to ../brouter/segments2/
copy your  *.dat files to ../brouter/profiles2/
copy lookups.dat to ../brouter/profiles2/
---
Yes i have brouter folder on my sdcard . I copied rd5 to brouter/segments2 and lookups.dat and all *.brf files  to brouter/profiles2

But still opening Brouter i see...
[attachment=0:3pu7ua62]screenshot2013050320514.png[/attachment:3pu7ua62]
Title: Re: BRouter
Post by: locuscycling on May 04, 2013, 19:26:15
I think somebody had a similar problem with Brouter installation on Xperia T
I have read  here //https://groups.google.com/forum/?fromgroups=#!topic/osm-android-bikerouting/GC8nRv8vohI

This is a quote from Arnd ( I think a Boss of Brouter)
"No coordinate Source from a maptool found" heisst, er hat die Datei favorites.gpx im osmand Verzeichnis nicht gefunden.

Dass kann sein, auch wenn OsmAnd korrekt unter dem angegebenen Basisverzeichnis installiert ist, weil OsmAnd diese Datei wohl erst anlegt, wenn zum ersten Mal ein "Favorit" (=Wegpunkt, POI, ..) angelegt wurde.

Brouter braucht einen Start- und einen Zielpubkt, um einer Route ausrechnen zu können. Dafür sucht er in der Favoriten-Datenbank von OsmMand (oder "POI"-Datenbank in Locus, "Waypoint" in Oruxmaps") nach Favoriten mit den Namen "to" und "from". Die musst Du anlegen.

Maybe should i create folder POI  in Locus ? But where?

I have already downloaded POI for Poland then imported points ( something like 400000 points) , i can see these points on maps but still have the same error.
Title: Re: BRouter
Post by: tommi on May 04, 2013, 19:39:42
locuscycling, you need just few points with the names "from" (this is the startpoint), "to" (the destination point) and if you need a route with intermediate destinations points with name "via1", "via2", etc.
You don't need to download any points, just define them in Locus, it works, I've tried it.
You can reuse the points easily if you use the quick points (just give them each a reasonable icon as the  names of the points are not visible in the dialog).
Did you have a look on gynta's video http://www.oldboys.at/dl/locus/brouterdemo.avi (http://www.oldboys.at/dl/locus/brouterdemo.avi)? It is pretty explanatory.

@gynta: Where did you get all these beautiful icons from? And how did you integrate them into Locus? Would like to get them if you agree.
Title: Re: BRouter
Post by: locuscycling on May 04, 2013, 21:50:11
Thanks ,,tommi'' , thanks ,,gynta'' for your video- it works .  
I can create a route OFFLINE now-SUPER.
What is more now i can create route where it was impossibe  to do it Online .
(I know probobly in another region it will be inversaly .)

But still i have some doubts.

If i created and saved  few points ,,from''  when entering BROUTER i get error like - multipe point from '' . So i have renemed all points from to from 1,2 ..or doesn't matter what name.( this same with ,,to'' points)
Then i tap a map to create quick point give icon and write name ,,from'' and save the point ( then the same with point ,,to'') .With points ,,via'' it is easier to understand  for me.

But on ''gynta'' video 0.06 sek he didn't write nothing , just tap icon .Maybe he didn't have to write ,,from'' becouse the name is included in icon? (This same with points ,,to'')

Every time i wanted created new route ( from another place) i have to deleted last points ,,from'' and created new one. Otherwise  route will be calculated from last point -named,, from'' ( points which was saved ).


Another question-about Right Panel on Video.
I see icon ,,video'' . Is it possible in Locus ?. I know is it possible to give ,,photo'' to right panel but ,,video'' ???
Title: Re: BRouter
Post by: gynta on May 05, 2013, 00:38:28
Quote from: locuscyclingBut on ''gynta'' video 0.06 sek he didn't write nothing
i will create another clip soon - to explain how this works...

QuoteI see icon ,,video'' . Is it possible in Locus ?. I know is it possible to give ,,photo'' to right panel but ,,video'' ???
If your device is rooted - you can install screencast (https://play.google.com/store/apps/details?id=com.ms.screencast) and put the app to your right panel.

---

EDIT
here we are:

# First add the function "Quick new point (http://docs.locusmap.eu/doku.php/manual:quick_new_point)" to your right panel (http://docs.locusmap.eu/doku.php/manual:set_right_panel).

# How to add some QuickPoints for brouter in Locus -> quickpoints4brouter.avi (http://www.oldboys.at/dl/locus/quickpoints4brouter.avi) (6Mb)

# Install and add brouter (http://www.brensche.de/brouter/offline.html) to your right panel. 

# How to use brouter in Locus -> brouterdemo.avi (http://www.oldboys.at/dl/locus/brouterdemo.avi) (2,5Mb)

And if you need additional -> the little iconpack (http://www.oldboys.at/dl/locus/directions.zip)  (14Kb) (copy to ..Locus/icons/...)
Title: Re: BRouter
Post by: locuscycling on June 04, 2013, 13:20:43
Thanks, gynta - excellent !!!!
( I have already read your ''EDIT'' )

Now it is very easy .
The ,,point'' is -Name of the definition.
I didn't know this before and thought that we have to write the same ,,from'' , ''to'' ,,via'' every time we will create new route.
Title: Re: BRouter
Post by: gynta on June 04, 2013, 14:31:19
Quote from: "locuscycling"Thanks, gynta - excellent!
you're welcome. I'm glad if it helps you.

btw.
 I have also edited the first posting now.
 Has anyone tested the new "nogo" rule?
Title: Re: BRouter
Post by: tommi on June 06, 2013, 21:26:19
Quote from: "gynta"Has anyone tested the new "nogo" rule?
Yes, it seems to work.
Do you have doubts?
Title: Re: BRouter
Post by: gynta on June 06, 2013, 22:24:09
Demo with nogo:
# How to use brouter and the "nogo function" in Locus -> nogo.avi (http://www.oldboys.at/dl/locus/nogo.avi) (3,5Mb)

updated iconpack(add nogo):
#And if you need additional -> the little iconpack (http://www.oldboys.at/dl/locus/directions.zip)  (16Kb) (copy to ..Locus/icons/...)
.
Title: Re: BRouter
Post by: Menion on June 07, 2013, 12:12:17
gynta bring BRouter in locus into almost perfect offline solution :). Suggest to show this to BRouter developer. Maybe it convince him to make it even better (more integrated into Locus).
Title: Re: BRouter
Post by: tommi on June 07, 2013, 14:38:42
Quote from: meniongynta bring BRouter in locus into almost perfect offline solution <!-- s:) -->:)<!-- s:) -->. Suggest to show this to BRouter developer. Maybe it convince him to make it even better (more integrated into Locus).
Seems Arnd is currently following his own ideas regarding control interface, see:
Quote
BRouter - Beta Version 0.9.1 - Using the service interface
==========================================================

BRouter 0.9.1 contains an experimental service interface.

Technically, it's an internal HTTP-Server running on the
device serving the same protocol as an online service.

This server serves requests of the form:

<!-- m -->http://localhost:17777/brouter?format=k ... yer=mapnik (http://localhost:17777/brouter?format=kml&flat=49.565883&flon=8.799297&tlat=49.563606&tlon=8.811764&v=bicycle&fast=0&layer=mapnik)<!-- m --> HTTP/1.1

and responds with a track in KML format. This protocol is similar to that
spoken between OsmAnd and YourNavigation.

Consequently, it is not required anymore to have from/to
waypoints, if not present, BRouter simply starts it's
service and does no route calculation.

The server is running within an Android service that is started
from the BRouter APP when pressing the "Server-Mode" Button as
a last step. It uses the configuration (profile + nogo-areas)
configured in the app. If the service is already running, it
keeps running and just the configuration is updated when
pressing the "Server-Mode" Button.

That way it is possible to habe fully integrated navigation
in OsmAnd with the BRouter routing as an offline service,
fully configurable via the profile selection and nogo-areas.

In this setup, all configuration within OsmAnd (motocar/bicycle/foot,
fastest/shortest, exclusions) is ignored.

This internal HTTP interface is a preliminary solution, therefore
there is nithing happening to get the necceray patch in the
OsmAnd release process (You need to patch it yourself, either
by building from source, or patching on binary level using apktool,
or tempering with /etc/hosts might also work if you have rooted
your phone).

The problem in this setup is that there's no guarantee from
the android system to keep this service alive, it might, at any
time, shut it down to reclaim the memory. So the "final" solution
for an offline routing interface will probably have to use
the android service architecture "as intended" without going
through an http-interface.

However, in my tests, it works fine, and service shutdowns
are no problem on my Android 2.3.6 phone and somewhat more
frequent on my 4.0.1.

Perfomance is o.k. for intermediamte distances (<20 km air distance),
for larger distances you will have to use the "traditional" BRouter
file interface for the first run, and then put waypoints along that
track.
source (and original textfile: <!-- m -->http://dr-brenschede.de/brouter_bin/brouter_0_9_1.zip (http://dr-brenschede.de/brouter_bin/brouter_0_9_1.zip)<!-- m --> (readme_service.txt - 2013 06 - from here (http://www.brensche.de/brouter/offline.html)

Menion, there is another project working on offline navigation <!-- m -->http://graphhopper.com/ (http://graphhopper.com/)<!-- m --> and you made a mysterious hint regarding it. Can we expect a solution from there?
Title: Re: BRouter
Post by: Menion on June 08, 2013, 08:36:33
Hmm local http server is quite crazy idea, but it should work and should be quite easy then, to add it directly to locus. anyway I contacted author of graphhooper if he not forget on Locus :) and we'll see ...
Title: Re: BRouter
Post by: abrensch on June 17, 2013, 11:33:15
Quote from: "menion"Hmm local http server is quite crazy idea, but it should work and should be quite easy then, to add it directly to locus.

Hi Menion,

no, local http doesn't really work because I don't have enough control on process lifecycle. Android is shutting down my service sometimes, limiting the usablility.

This idea is just one step towards integration, because it was easy to do. What I want to achieve is to define an offline routing interface that is open on both sides (=allows to exchange the router as well as the map tool), that fits into the android programming model (=router is started implictly by the requesting maptool, no lifecycle issues) and that transports more information (=router gets e.g. moving direction, map tool gets e.g. voice navigation hints in addition to plain track)

However, my Android knowledge ist still very limited, so any help is appreciated.

regards, Arndt
Title: Re: BRouter
Post by: tommi on June 28, 2013, 20:44:55
Quote from: "abrensch"Hi Menion,

no, local http doesn't really work because I don't have enough control on process lifecycle. Android is shutting down my service sometimes, limiting the usablility.

This idea is just one step towards integration, because it was easy to do. What I want to achieve is to define an offline routing interface that is open on both sides (=allows to exchange the router as well as the map tool), that fits into the android programming model (=router is started implictly by the requesting maptool, no lifecycle issues) and that transports more information (=router gets e.g. moving direction, map tool gets e.g. voice navigation hints in addition to plain track)

However, my Android knowledge ist still very limited, so any help is appreciated.

regards, Arndt
Hi Menion,
your help here could bring Locus navigation forward.
See Arndt's request for help also here: https://groups.google.com/forum/#!topic ... AGCaq32QUU (https://groups.google.com/forum/#!topic/osm-android-bikerouting/dAGCaq32QUU)
... including relevant source code for brouter.
Title: Re: BRouter
Post by: tommi on June 30, 2013, 22:14:41
@Menion:
Is brouter now in a state which allows a tighter integration into Locus?

http://dr-brenschede.de/brouter/revisions.html:
brouter_0_9_3.zip (current revision, 30.6.2013)

    introduced new service interface as android service
    re-designed service-mode configuration to be more flexible
Title: Re: BRouter
Post by: broskev on July 11, 2013, 14:33:29
Hi please could you help me?

I followed instructions written here and watched the videos but still cannot make it works. What I did:

- I installed brouter including segments (E5_N45 - E20_N50, this should cover also Czech Republic where I am testing it)
- I ran Locus (or oruxmaps), added "From" and "To" waypoints and started Brouter
- I selected some route profile (e.g. shortest)

--> It displayed message:
Success, no from/to found (coordinate-source: /mnt/sdcard/oruxmaps)
There are buttons "Exit" and "Server-Mode"

No gpx file is created into Loxus/Oruxmaps folders.. Interesting is that when I close the message, it will open network settings (data, gps...). But I think I do not need GPS/data enabled..

I tried it with offline and online maps, vector maps... Still the same result.

Thank you

Ondrej

Motorola XT320
Android 2.3.6
Locus Free
Title: Re: BRouter
Post by: jusc on July 11, 2013, 15:10:21
I think it´s case sensitive...
Points are from/to not From/To
Title: Re: BRouter
Post by: tommi on July 11, 2013, 15:14:17
Hm, first I thought it's because you maybe didn't create from and to points but From and To. But If I delete my from and to pair and create From and To, an error message similar to your one appeared but *before* asking me for a route profile!?
Title: Re: BRouter
Post by: broskev on July 11, 2013, 19:25:52
I changed the waypoints to "from" and "to" and I got an error:

from-position not mapped. it is displayed after chosing route profile.

If you need some more information, please let me know.
Title: Re: BRouter
Post by: gynta on July 11, 2013, 19:57:47
So there's most likely not the correct routing-data-file in the brouter/segments2 directory
Title: Re: AW: BRouter
Post by: jusc on July 11, 2013, 20:07:07
Can you please show the used coordinates?
Title: Re: BRouter
Post by: broskev on July 12, 2013, 00:00:43
Guys,

actually one segment file was missing. Now it works fine. I am sorry it was my fault. It was quite difficult for me to understand the segment files...

Thanks for help.

O.
Title: Re: BRouter
Post by: jusc on July 21, 2013, 16:46:11
There ist a new version 0.9.3 with a service for android. http://brensche.de/brouter/revisions.html (http://brensche.de/brouter/revisions.html)
But what is to do?
Title: Re: BRouter
Post by: Menion on July 21, 2013, 17:53:16
ah I forget to respond to Arndt's message 17th June. But seems, he solved it professionally alone, perfect :)

What to do? With this new BRouter service, every developer may use BRouter app directly, so it can be called within a code to compute parameters. So if there will be interest from your (users) side and from Arndt site, I should look at it ...
Title: Re: BRouter
Post by: gynta on July 21, 2013, 17:57:13
Quote from: "menion".., I should look at it ...
yes, you should ;)
Title: Re: BRouter
Post by: Menion on July 21, 2013, 18:08:50
I just wrote Arndt short email, so I'll see what he think about it ...
Title: Re: BRouter
Post by: marram on October 01, 2013, 13:22:56
Any news?
Title: Re: BRouter
Post by: jusc on October 02, 2013, 10:59:52
Quote from: menion on July 21, 2013, 17:53:16

What to do? With this new BRouter service, every developer may use BRouter app directly, so it can be called within a code to compute parameters. So if there will be interest from your (users) side and from Arndt site, I should look at it ...

Yes, I´m waiting too ;)
Title: Re: BRouter
Post by: tommi on October 02, 2013, 17:52:25
And me, too:(
Title: Re: BRouter
Post by: Menion on October 03, 2013, 13:22:13
ah I forget on this topic. Arndt already answered me on some questions I ask him, anyway .. hmm, what's the main task here? What you expect from me to do? :). Add BRouter as an additional item next to MapQuest, CloudMade etc. that allow compute route between two points?
Title: Re: BRouter
Post by: tommi on October 03, 2013, 14:16:08
Quote from: menion on October 03, 2013, 13:22:13
ah I forget on this topic. Arndt already answered me on some questions I ask him, anyway .. hmm, what's the main task here? What you expect from me to do? :). Add BRouter as an additional item next to MapQuest, CloudMade etc. that allow compute route between two points?
Yes, including selection of the different routing profiles.
Support in navigation and route and measure screens.
No idea how nogo points would match into locus system but this has in my eyes only 2nd priority.
Title: Re: BRouter
Post by: jusc on October 03, 2013, 15:36:12
Quote from: menion on October 03, 2013, 13:22:13
ah I forget on this topic. Arndt already answered me on some questions I ask him, anyway .. hmm, what's the main task here? What you expect from me to do? :). Add BRouter as an additional item next to MapQuest, CloudMade etc. that allow compute route between two points?
I´m not sure if that is the best way, because BRouter works in an other way as p. e. Cloudemade.
At last BRouter works only between two points (start point  with name = "from" and target point with name = "to"). Diffrent from Cloudmade you have to define all interim targets as VIA points and the two points "from" and "to"before you can start the calculation of BRouter. With Cloudmade you start with the first point and second point is defined automatically as first tartget or VIA point, if you set another (second) target and so on.
In my eyes it would be better, users should be asked after tapping the "new route" button if they want to calcuilate it online (Cloudemade/Mapquest etc.) or offline with BRouter.
In settings nothing should changed, So your preference for online routing should be selectable before.

What I mean: I select Cloudmade for online routing in settings. No I start to calculate a new route, And than pops up only the question online or offline. If I choose "online" the calculation starts automatically with Cloudmade.

justmy2cents


Title: Re: BRouter
Post by: tommi on October 03, 2013, 17:03:16
I'm thinking Locus should feed brouter only with two points.
Currently you define the route e.g. by
from via1 via2 to.
Locus could call brouter in a sequence with
from=from to=via1
from=via1 to=via2
from=via2 to=to
Title: Re: BRouter
Post by: jusc on October 03, 2013, 17:26:48
Do you think, Locus can change the first "to" point to Via1 if the user sets a new ("to") point and so on?
Title: Re: BRouter
Post by: tommi on October 03, 2013, 20:27:09
The user shall not set from, to, via. Locus shall set to and from points according to the programming interface brouter offers.
The user shall set points in Locus as for other routing services.
Example: Route and measure: User defines four points p1, p2, p3, p4 and selects the routing profile.
Locus takes p1 and p2 and calls brouter with from=p1, to=p2 routing profile and gets back the calculated route1.
Then Locus calls brouter with from=p2, to=p3 and again gets back route2.
Then the same with p3, p4 and route3.
Locus concatenates route 1, 2, 3 and saves this as the result of route and measure.
Title: Re: BRouter 0.9.1
Post by: gynta on October 07, 2013, 09:28:39
Topic closed
New thread -> http://forum.locusmap.eu/index.php?topic=3434.0
Because there are essential modifications between BRouter and Locus.