poutnikl / Brouter-profiles

My profiles for Brouter offline routing on Android platform
76 stars 17 forks source link

Brouter-profile for touring cyclists with luggage -> long-distance travel #22

Open 1MatthiasG opened 4 years ago

1MatthiasG commented 4 years ago

Hi poutnikl. your BRouter profile are great! I use e.g. the MTB profile for my MTB tours.

However, I miss a profile for touring cyclists (with luggage) -> long-distance travel: if possible on bike paths (all variants) if possible without car traffic, or little car traffic,, e.g. at least on track type grade3 (grade4?), avoiding strong gradients (for example > 13%) ...

Does this already exist?

I found your instructions to create it myself - but I'm not sure if I can do it optimally. -> Release version - or Development/Beta version

poutnikl commented 4 years ago

I would take rather the develop branch of the template.

Here is the link to generated package of profiles derived from template from develop branch.

Use hills=2, that sets a velomobile-like baseline hillcost settings ( 1.0/80 up, 0.5/80 down. This avoids hills a lot.

Avoiding of incline above a threshold is problematic, as it may lead to unwanted side effects.

You may play with profile internal intermediate parameter uphillcostvalue to set it to 3.0, what kind of prefer milder slopes.

To have incline threshold, there would be needed some dirty tricks. For downhill, the 0.5/80 cutoff)cost of hills=2 would stay. For uphill, a trick would be to have stepwise cost system with high uphillcutoff(value), probably low uphilcost(value) and very high uphillcostfactor and elevationbuffer reduce factor ( see Glossary ), but such profile is not ready yet.

develop version uses cycleroute_pref even above 1.0 ICR ( ignore CR ) 0.0 default 0.2 FCR ( follow CR ) 0.5 LCR ( Long distance CR ) 0.8

LCR is reasonable preferring international and national cycle routes, while the 2 profiles below becomes extreme to rather avoid other roads and in ICN case any road but international routes, giving them quite high cost.

later added NCN ( (inter)national cycle network ) 1.5 ICN ( international CN ) 5.0 ( great to follow e.g. Eurovelos without the need to follow Eurovelo GPX - but watch ICR crossings )

I use a Linux (Android+termux) script sedbatch generating profiles locally on the device from local or GitHub templates. ( The link leadss to not the latest version )

The parameter substitution easily read bfron the script text even if you are not familiar with coding )

Additionally you can tweak road preferences with MTB factor, smallpaved_factor ( see wiki Glossary ) and probably not well yet documented Unifactoradjust ( selects type of rides neutral wrt the former 2 factors.

For long distance Eurovelo routing, I would use Trekking-ICN-hills2 profile, for general usage, I would experiment with mentioned parameters.

poutnikl commented 4 years ago

See also Determining-optimal-bicycle-profile where is a link to highle experimental development branch, implementing hill=6 as Not Too Steep attempt, highly configurable by about 6 parameters, must be played with.

OdyX commented 2 years ago

Such a profile would/should also prioritize main roads when possible (possibly avoiding traffic constraints). It's especially important when map data is not (yet?) precise with regards to paving, access constraints, etc. Current case in mind: routing in Mexico & Colombia, where the main grid is on OSM, but too often imprecise. We're resorting to use fastbike-asia-pacific, but one with a non-zero uphillcostfactor would make more sense.

poutnikl commented 2 years ago

@OdyX There would be then need for separate profiles, as in the West/Central Europe theatre of bicycle travelling, one usually avoids main roads ( at least from secondaries up, often even from tertiaries) as devil the cross. Probably topic for implementing a new flag: assign underdeveloped = true/false

OdyX commented 2 years ago

Let me just suggest a wording a little less condescending such as unprecisemapping, incompletemapping, mappingdataisrough. But I see the point yes!

poutnikl commented 2 years ago

Well, For Brouter and it's profiles, there is no reality but the one that is mapped in Openstreetmaps. And only just part of that. Any profile may be forced to use just main roads as they may be the only ones mapped.

True, Brouter web frontend or some Brouter aware apps like LocusMap offer to use offroad routing. But that is based on linear point2point route segment creation and has nothing to do with profile based routing.

OdyX commented 2 years ago

It seems in the region I'm in currently, I can get more or less what I want with these patches to fastbike-asia-pacific:

--- fastbike-asia-pacific.txt   2022-02-09 21:12:08.557459558 -0500
+++ fastbike-americas.txt       2022-02-09 21:11:45.320569384 -0500
@@ -18,6 +18,7 @@
 assign   stick_to_cycleroutes 0   # set to 1 to just follow cycleroutes
 assign   avoid_unsafe         0   # set to 1 to avoid standard highways
 assign   UnpavedCostfactor    20.0
+assign   UnclassifiedCostFactor 10.0 # In doubt, penalize unclassified roads
 assign   PavingUnsureCostfactor 6.0

 # this prevents suppression of unused tags, so they are visibly in the data tab;
@@ -159,11 +160,11 @@
   add trafficpenalty

   switch    highway=motorway|motorway_link|construction|abandoned    10000
   switch    highway=trunk|trunk_link                  10
   switch    highway=primary|primary_link              switch any_cycleroute 1.5 3.0
   switch    highway=secondary|secondary_link          switch any_cycleroute 1.2 1.6
   switch    highway=tertiary|tertiary_link            switch isunpaved UnpavedCostfactor 1.0
-  switch    highway=unclassified                      switch isunpaved UnpavedCostfactor 1.0
+  switch    highway=unclassified                      switch isunpaved UnpavedCostfactor UnclassifiedCostFactor
   switch    highway=pedestrian                        switch ispaved 10 UnpavedCostfactor
   switch    highway=steps                             1000
   switch    route=ferry                               5.67