MTB_factor and smallpaved_factor - poutnikl/Brouter-profiles GitHub Wiki

  • Parameters MTB_factor and smallpaved_factor modifies the behavior of profiles based on the Trekking-Poutnik template. The effect is created by the parameter of positive value (+), negative value (-) or parameter has no effect (0). The opposite parameter value sign has the opposite effect.
Effect MTB_factor Smallpaved_factor
Supress unpaved ways* - +
Supress mainroad network + +
Prefer unpaved ways + -
Prefer mainroad network - -
Prefers small paved roads 0 +
Prefers less hilly roads - +
Decreases turncost + -
Decreases roughness penalty + -

* way means any OSM way highway=*, physically a general way from motorway to path

  • The Positive values of MTB_factor progressively increases costfactor of mainroads, while decreases costfactor of of unpaved tracks/paths. It additionally decreases elevationcost and roughness cost ( combined evaluation of tags smoothness and MTB_scale ), so bikers are more stimulated to take up/down tracks.

  • The Negative values of MTB_factor have the opposite effect: They progressively prefer the mainroads and supress unpaved ways, increase elevationcosts(preferring flatter roads) and additionally suppress rough surfaces.

  • Positive values of smallpaved_factor progressively suppress mainroads and unpaved ways, promoting small paved roads. Negative values suppresses small paved roads - this makes sense together with big MTB_factor.

  • The road suppressing/boosting scale is unified for the both factors, using the common scaling factor univ_factor_coef. Similarly is unified the approach to elevation and roughtness penalties.

  • MTB_factor 1.0 adds 1.0 to the highway=trunk costfactor, making 1 km of such road effectively 1 km longs. As the opposite, it adds -1.0 to the costfactor of highways=track|path, trackgrade=grade5, surface=ground, making 1 km effectively 1 km shorter.( Notes that the base effective length of such 1 km track is significantly bigger than 1 km.)

  • Smallpaved_factor 1.0 adds 1.0 to costfactor of both trunk and unpaved ground tracks.

  • Effect of both factors on intermediate road classes a/o surfaces is somewhere between both extremes.

  • MTB and SP factor

  • The OSM ways classes are figurally spreaded along the horizontal scale with big roads like trunks on the very left, small paved roads/tracks in the middle and small gravel/soil paths on the very right.

  • Values below are from Trekking-Poutnik template version 2.4.15 ALFA, can be subject of later tuning.
    For current values, see Trekking-Poutnik current template

assign univ_factor_coef = (  

    
         if ( highway=motorway|motorway_link|trunk|trunk_link ) then 1.0
    else if ( highway=primary|primary_link )                    then 0.9
    else if ( highway=secondary|secondary_link )                then 0.7
    else if ( highway=tertiary|tertiary_link )                  then 0.4
    else if ( highway=unclassified )                            then 0.25
    else if ( highway=residential|living_street|service|pedestrian|footway   )
                                                                then switch ispaved 0.25 switch isunpaved -0.4 0.0
    else if not highway=track|road|path                         then switch ispaved 0.25 switch isunpaved -0.4 0.0 # 
    else if highway=track|road then (                           # not path
              if surface=concrete                               then -0.2
              else if and tracktype=grade1 ispaved              then 0.2
              else if or tracktype=grade1 ispaved               then 0.1
              else multiply ( add 1.0 ( multiply 0.33 roughness_penalty ) )
                ( if surface=cobblestone                        then -0.4
                  else if surface=fine_gravel                   then -0.4
                  else if surface=                              then switch tracktype=grade2|grade3 -0.4 -0.7
                  else if surface=compacted                     then -0.5
                  else if surface=grass                         then -0.8
                  else if surface=ground|gravel|pebblestone|mud then -1.0
                                                                else -1.0
                )                                                  
         )   
         # is path
     else ( multiply ( add 1.0 ( multiply 0.33 roughness_penalty ) )
                   ( if surface=concrete                   then -0.3
                     else if ispaved                       then  0.1
                     else if surface=compacted|fine_gravel then -0.4
                     else                                       -1.0
                     )
          )           
                   
)