BRouter 0.9.1

Started by gynta, April 04, 2013, 20:34:26

0 Members and 1 Guest are viewing this topic.

gynta

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

And the routing data files from:
<!-- m -->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<!-- m --> - 2013 06 - from here


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

# First add the function "Quick new point" to your right panel.

# How to add some QuickPoints for brouter in Locus -> quickpoints4brouter.avi (6Mb)

# Install and add brouter to your right panel. 

# How to use brouter in Locus -> brouterdemo.avi (2,5Mb)

And if you need additional -> the little iconpack  (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<!-- l -->

tommi

#1
I planned to do but did not find time yet and will not find time within the next two weeks.
  •  

jusc

#2
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.
Regards J.
  •  

sherman

#3
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.
  •  

jusc

#4
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) was updated. Now you can use stopovers or waypoints on your route. https://groups.google.com/forum/m/?from ... UP9QbXdfOM.
A usefull feature, at least in my eyes.
Thanks to Arndt for his efforts.
Regards J.
  •  

locuscycling

#5
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.
  •  

sherman

#6
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/

The profiles at 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.
  •  

gynta

#7
Oh here is my missing thread ;)
So here my question again.

What I'm doing wrong here:
edit: videoclip removed - because it's solved...

sherman

#8
Well, this seems to be a question for the author of the app. Try to ask here: https://groups.google.com/forum/?fromgr ... ikerouting

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

sherman

#9
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.
  •  

jusc

#10
@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.
Regards J.
  •  

gynta

#11
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.

jusc

#12
Does it route if you use the online route service of Cloudemade?
Regards J.
  •  

sherman

#13
I was curious so I did try Cloudmate – no problem. So it seems to be a sort of bug in BRouter.
  •  

locuscycling

#14
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 .)
  •