From 28cc151931a70a736eb216f3be0f49bc023ebc3f Mon Sep 17 00:00:00 2001 From: poutnikl Date: Wed, 18 Sep 2019 10:52:41 +0200 Subject: [PATCH 1/5] Updated development guide --- misc/readmes/profile_developers_guide.txt | 34 +++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/misc/readmes/profile_developers_guide.txt b/misc/readmes/profile_developers_guide.txt index b6bdf8e..81e9d90 100644 --- a/misc/readmes/profile_developers_guide.txt +++ b/misc/readmes/profile_developers_guide.txt @@ -86,6 +86,14 @@ the routing engine: - turnInstructionCatchingRange default 40m - turnInstructionRoundabouts default=true=generate explicit roundabout hints + - variables to modify BRouter behaviour + + - processUnusedTags + default is false. If an OSM tag is unused + within the profile, BRouter totallgy ignores tag existence + what increases BRouter speed. As sidedgjv effect, the tag is not even listed + in the route segment table nor the table exported as CSV. + - for the way section these are - turncost @@ -95,6 +103,7 @@ the routing engine: - downhillcostfactor - nodeaccessgranted - initialclassifier + - priorityclassifier - for the node section this is just @@ -203,6 +212,24 @@ to adding the value of "initialcost". For backward compatibility, if "initialclassifier" = 0, it is replaced by the costfactor. +The priority classifier +----------------------- + +Priorityclassifier is a BRouter numerical parameter +calculated for ways and used for generation of pictogram/voice navigation instructions. + +Higher values means the more significant(noticable) way, +AFA it can be predicted from OSM data. + +To avoid navigation instruction flood, it was decided +the instructions are provided only if: + +1/ You are supposed to turn at a crossroad/junction + and some other ways have the same or higher Priorityclassifier value. +OR +2/ You are supposed to go straight ahead + and some other ways have the higher Priorityclassifier value. + Technical constraints --------------------- @@ -271,3 +298,10 @@ and that values are only appended at the end of the value lists. This is because the routing data files adress tags and values by their sequence numbers, so changing sequences would produce garbage data. + +Other resources +--------------- + +See https://github.com/poutnikl/Brouter-profiles/wiki/Glossary +as a complementary inofficial source +about various profile internals. From d176937c416fdd42b8ddeaa3532122787d7b1399 Mon Sep 17 00:00:00 2001 From: poutnikl Date: Wed, 18 Sep 2019 10:53:43 +0200 Subject: [PATCH 2/5] Updated development guide --- misc/readmes/profile_developers_guide.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/misc/readmes/profile_developers_guide.txt b/misc/readmes/profile_developers_guide.txt index 81e9d90..4d31115 100644 --- a/misc/readmes/profile_developers_guide.txt +++ b/misc/readmes/profile_developers_guide.txt @@ -247,6 +247,13 @@ Technical constraints (way-)costfactor, and >=1000000. for a nodes "initalcost" are treated as infinity, so please use these as the "forbidden" values. +- Ways with costfactor >= 10000 are considered as if they did not exist at all. + +- Ways with costfactor = 9999 are considered as + if they did not exist, but only during route calculation. + The navigation hint generator takes them into account. + + Developing and debugging scripts -------------------------------- From 31210281b2ad248b89f6503d2d3cf280f39a36fa Mon Sep 17 00:00:00 2001 From: "poutnikq@atlas.cz" Date: Thu, 19 Sep 2019 04:19:03 +0200 Subject: [PATCH 3/5] Impriving developer guide --- misc/readmes/profile_developers_guide.txt | 31 +++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/misc/readmes/profile_developers_guide.txt b/misc/readmes/profile_developers_guide.txt index b6bdf8e..0b92750 100644 --- a/misc/readmes/profile_developers_guide.txt +++ b/misc/readmes/profile_developers_guide.txt @@ -86,6 +86,14 @@ the routing engine: - turnInstructionCatchingRange default 40m - turnInstructionRoundabouts default=true=generate explicit roundabout hints + - variables to modify BRouter behaviour + + - processUnusedTags + default is false. If an OSM tag is unused + within the profile, BRouter totallgy ignores tag existence + what increases BRouter speed. As sidedgjv effect, the tag is not even listed + in the route segment table nor the table exported as CSV. + - for the way section these are - turncost @@ -95,6 +103,7 @@ the routing engine: - downhillcostfactor - nodeaccessgranted - initialclassifier + - priorityclassifier - for the node section this is just @@ -203,6 +212,21 @@ to adding the value of "initialcost". For backward compatibility, if "initialclassifier" = 0, it is replaced by the costfactor. +The priority classifier +----------------------- + +Priorityclassifier is a BRouter numerical parameter +calculated for ways and used for generation of pictogram/voice navigation instructions. + +Higher values means the more significant(noticable) way, +AFA it can be predicted from OSM data. + +To avoid navigation instruction flood, it was decided +the instructions are provided only if: + +You are supposed to turn at a crossroad/junction and the other alternatives have the same or higher priority. +You are supposed to go straight ahead and some of other alternatives have the higher priority. + Technical constraints --------------------- @@ -271,3 +295,10 @@ and that values are only appended at the end of the value lists. This is because the routing data files adress tags and values by their sequence numbers, so changing sequences would produce garbage data. + +Other resources +--------------- + +See https://github.com/poutnikl/Brouter-profiles/wiki/Glossary +as a complementary inofficial source +about various profile internals. From b1650537dd6bd7f1cecbc109f010a0bb0f13f37a Mon Sep 17 00:00:00 2001 From: poutnikl Date: Fri, 20 Sep 2019 17:07:35 +0200 Subject: [PATCH 4/5] Updated development guide --- misc/readmes/profile_developers_guide.txt | 100 +++++++++++++++++++--- 1 file changed, 90 insertions(+), 10 deletions(-) diff --git a/misc/readmes/profile_developers_guide.txt b/misc/readmes/profile_developers_guide.txt index 4d31115..17831c6 100644 --- a/misc/readmes/profile_developers_guide.txt +++ b/misc/readmes/profile_developers_guide.txt @@ -22,6 +22,13 @@ Each value can have optional "aliases", these alias values are encoded into the same binary value as the associated primary value. +A profile must use expresion tag=the_first_tagvalue_alias, +as other alliases trigger an error. +E.g. if there is a line in lookups.dat file +"bicycle;0001245560 yes allowed" +a profile must use "bicycle=yes", +as "bicycle=allowed gives an error". + The numbers in the lookup table are statistical information on the frequency of the values in the map of germany - these are just informational and @@ -88,11 +95,11 @@ the routing engine: - variables to modify BRouter behaviour - - processUnusedTags - default is false. If an OSM tag is unused - within the profile, BRouter totallgy ignores tag existence - what increases BRouter speed. As sidedgjv effect, the tag is not even listed - in the route segment table nor the table exported as CSV. + - processUnusedTags ( default is false ) + If an OSM tag is unused within the profile, BRouter totally ignores the tag existence + what increases BRouter speed. As a side effect, the tag is not even listed + in the route segment table nor the table exported as CSV. Setting it to true/1, + Brouter-web Data page listed all tags present in the RD5 file. - for the way section these are @@ -208,7 +215,10 @@ The initial cost classifier To trigger the addition of the "initialcost", another variable is used: "initialclassifier" - any change in the value of that variable leads -to adding the value of "initialcost". +to adding the value of "initialcost". + +An useful case may be an initial cost four mounting/dismounting a bicycle, +having set an initialclassifier for ways without bicycle access, with high initialcost. For backward compatibility, if "initialclassifier" = 0, it is replaced by the costfactor. @@ -231,6 +241,75 @@ OR and some other ways have the higher Priorityclassifier value. +The elevation buffer ( From Poutnik's glossary ) +------------------- +with related 3 internal BRouter variables: + - elevationpenaltybuffer + - elevationmaxbuffer + - elevationbufferreduce + +the Elevation Buffer is BRouter feature to filter elevation noise along the route. +It may be real, or caused by the artefacts of used SRTM elevation data. + +From every elevation change is at the first place cut out amount 10*up/downhillcutoff +per every km of the way length. What remains, starts to accumulate in the buffer. +IF cutoff demand of elevation per length is not saturated from incoming elevation, +it is applied on elevation remaining in the buffer as well. + +E.g. if the way climbs 20 m along 500 m, and uphillcutoff=3.0, then 10*3.0*0.5 = 15 m +is taken away and only remaining 5 m accumulates. But if it climbed only 10 m +on those 500m, all 10 m would be "swallowed" by cutoff, +together with up to 5 m from the buffer, if there were any. + +When elevation does not fit the buffer of size elevationmaxbuffer, +it is converted by up/downhillcost ratio to Elevationcost portion of Equivalentlength. +Up/downhillcostfactors are used, if defined, otherwise CostFactor is used. + +elevationpenaltybuffer is BRouter variable, with default value 5(m). + The variable value is used for 2 purposes: + With the buffer content > elevationpenaltybuffer, it starts partially convert + the buffered elevation to ElevationCost by Up/downhillcost, with elevation taken + = MIN (Buffer - elevationpenaltybuffer, WayLength[km] * elevationbufferreduce*10 + The Up/downhillcost factor takes place instead of costfactor at the percentage of + how much is WayLength[km] * elevationbufferreduce*10 is saturated + by the buffer content above elevationpenaltybuffer. + +elevationmaxbuffer - default 10(m) - is the size of the buffer, above which + all elevation is converted to Elevationcost by Up/Downhillcost ratio, + and - if defined - Up/downhillcostfactor fully replaces Costfactor + in way cost calculation. + +elevationbufferreduce - default 0(slope%)- is rate of conversion of the buffer content + above elevationpenaltybuffer to ElevationCost. For a way of length L, + the amount of converted elevation is L[km] *elevationbufferreduce[%]*10. + The elevation to Elevationcost conversion ratio is given by Up/downhillcost. + +Example: + Let examine steady slopes with elevationmaxbuffer=10, elevationpenaltybuffer=5, + elevationbufferreduce=0.5, cutoffs=1.5, Up/downhillcosts=60 + + All slopes within 0 .. 1.5% are swallowed by the cutoff + + For slope 1.75%, there will remain 0.25%. + That saturates the elevationbufferreduce 0.5% by 50%. That gives Way cost + to be calculated 50% from costfactor and 50% from Up/downhillcostfactor. + Additionally, 0.25% gives 2.5 m per 1km, converted to 2.5*60 = 150m of Elevationcost. + + For slope 2.0%, there will remain 0.5%. + That saturates the elevationbufferreduce 0.5% by 100%. That gives Way cost + to be calculated fully from Up/downhillcostfactor. Additionally, + 0.5% gives 5 m per 1km, converted to 5*60 = 300m of Elevationcost. + Up to slope 2.0% the buffer value stays at 5m = elevationpenaltybuffer. + + For slope 2.5%, there will remain 1.0% after cutoff subtract, + and 0.5% after the buffer reduce subtract. The remaining 0.5% accumulates in the buffer + by rate 5 m/km. When the buffer is full (elevationmaxbuffer), + the elevation transforms to elevationcost by full rate of 1.0%, i.e. 10 m/km, + giving elevationcost 10*60=600 m/km. + + + + Technical constraints --------------------- @@ -250,8 +329,8 @@ Technical constraints - Ways with costfactor >= 10000 are considered as if they did not exist at all. - Ways with costfactor = 9999 are considered as - if they did not exist, but only during route calculation. - The navigation hint generator takes them into account. + if they did not exist during route calculation, + but the navigation hint generator takes them into account. @@ -264,6 +343,8 @@ or set up a local installation. BRouter-Web has a window at the lower left corner with a "Profile" and a "Data" tab. Here, you can upload profile scripts and see the individual cost calculations per way-section in the "Data"-tab. +Activate eventually for the provile debugging "assign processUnusedTags = true" +to see on the Data tab all present OSM tags, not just those used in the tested profile. Lookup-Table evolution and the the "major" and "minor" versions @@ -310,5 +391,4 @@ Other resources --------------- See https://github.com/poutnikl/Brouter-profiles/wiki/Glossary -as a complementary inofficial source -about various profile internals. +as a complementary inofficial source about various profile internals. From ebb5fdd05e4e8d089631fd7f5830578cc5d53f16 Mon Sep 17 00:00:00 2001 From: "poutnikq@atlas.cz" Date: Fri, 20 Sep 2019 20:48:45 +0200 Subject: [PATCH 5/5] fixed some typos in developer guide update --- misc/readmes/profile_developers_guide.txt | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/misc/readmes/profile_developers_guide.txt b/misc/readmes/profile_developers_guide.txt index 2451da3..b94c817 100644 --- a/misc/readmes/profile_developers_guide.txt +++ b/misc/readmes/profile_developers_guide.txt @@ -96,10 +96,13 @@ the routing engine: - variables to modify BRouter behaviour - processUnusedTags ( default is false ) - If an OSM tag is unused within the profile, BRouter totally ignores the tag existence - what increases BRouter speed. As a side effect, the tag is not even listed - in the route segment table nor the table exported as CSV. Setting it to true/1, - Brouter-web Data page listed all tags present in the RD5 file. + If an OSM tag is unused within the profile, + BRouter totally ignores the tag existence. + Skipping unused tags improves BRouter speed. + As a side effect, the tag is not even listed + in the route segment table nor the table exported as CSV. + Setting it to true/1, Brouter-web Data page will list + all tags present in the RD5 file. - for the way section these are @@ -217,7 +220,7 @@ To trigger the addition of the "initialcost", another variable is used: "initialclassifier" - any change in the value of that variable leads to adding the value of "initialcost". -An useful case may be an initial cost four mounting/dismounting a bicycle, +A useful case may be an initial cost for bicycle mounting/dismounting, having set an initialclassifier for ways without bicycle access, with high initialcost. For backward compatibility, if "initialclassifier" = 0, it is replaced by the costfactor. @@ -228,7 +231,7 @@ The priority classifier Priorityclassifier is a BRouter numerical parameter calculated for ways and used for generation of pictogram/voice navigation instructions. -Higher values means the more significant(noticable) way, +Higher values means the more significant(noticeable) way, AFA it can be predicted from OSM data. To avoid navigation instruction flood, it was decided @@ -342,7 +345,7 @@ or set up a local installation. BRouter-Web has a window at the lower left corner with a "Profile" and a "Data" tab. Here, you can upload profile scripts and see the individual cost calculations per way-section in the "Data"-tab. -Activate eventually for the provile debugging "assign processUnusedTags = true" +Activate eventually for the profile debugging "assign processUnusedTags = true" to see on the Data tab all present OSM tags, not just those used in the tested profile. @@ -390,6 +393,6 @@ Other resources --------------- See https://github.com/poutnikl/Brouter-profiles/wiki/Glossary -as a complementary inofficial source +as a complementary unofficial source about various profile internals.