Hi Gerd

Attached is patch for Style Manual:
1/ Keep |not-contained filter example within the page.
2/ Fix the highway-symbol documentation to agree with the code.
3/ Describe road_class more accurately; consistent with default style. 
4/ Adjust various table widths to stop some long, unbreakable words
   running into the next col. Also make better use of space for text.
5/ Show the filter args separator char consistently.
6/ Quote all filter args in the examples.
7/ Improve country-ISO wording

Ticker

Index: doc/styles/internal-tags.txt
===================================================================
--- doc/styles/internal-tags.txt	(revision 4876)
+++ doc/styles/internal-tags.txt	(working copy)
@@ -20,7 +20,7 @@
 // see [[Mkgmap/help/Tags]]
 
 .Tags for routable roads
-[options="header"]
+[cols="4,6,3,7",options="header"]
 |=========================================================
 | Attribute   | mkgmap tag     | Example | Notes
 | Labels      | +mkgmap:label:1+ + 
@@ -56,7 +56,7 @@
 |=========================================================
 
 .Tags that control the treatment of roads
-[options="header"]
+[cols="8,7,5",options="header"]
 |=========================================================
 | Tag | Description     | Required mkgmap option
 | +mkgmap:way-has-pois+  | +true+ for ways that have at least one point with a tag +access=\*+, +barrier=\*+, or +highway=*+ | 'link-pois-to-ways'
Index: doc/styles/rules-filters.txt
===================================================================
--- doc/styles/rules-filters.txt	(revision 4876)
+++ doc/styles/rules-filters.txt	(working copy)
@@ -2,7 +2,7 @@
 // This is the list of variable filters.
 //
 .List of all substitution filters
-[width="100%",grid="rows",cols="<1,<1,3a",options="header"]
+[width="100%",grid="rows",cols="<1,<1,4a",options="header"]
 |=======
 | Name | Arguments | Description
 | def | `default` |
@@ -10,7 +10,7 @@
 This means that the variable will never be `unset' in places where that
 matters. 
 
-`${oneway\|def:no}`
+`${oneway\|def:"no"}`
 
 | conv | `m=>ft` |
 Use for conversions between units.
@@ -49,7 +49,7 @@
 | part | `separator operator partnumber` |
 Split a value in parts and returns one or more part(s) of it. If +partnumber+ is negative, the part returned is counted from the end of the split
 
-If not specified, the default separator is ';' and the first part is returned (i.e. `${name\|part:}`=`${name\|part:;:1}`).
+If not specified, the default separator is ';' and the first part is returned (i.e. `${name\|part:""}`=`${name\|part:";:1"}`).
 
 If the operator is `:` the part specified by +partnumber+ is returned.
 
@@ -80,8 +80,7 @@
 Prepares the value as a highway reference such as "A21" "I-80" and so
 on.
 A code is added to the front of the string so that a highway shield is
-displayed, spaces are removed and the text is truncated so as not to overflow the
-symbol.
+displayed, any ";" are replaced by "/" and spaces are removed.
 
 `${ref\|highway-symbol:"box:4:8"}`
 
@@ -91,7 +90,11 @@
 references that contain numbers and letters.
 The second is the maximum length of references that do not contain numbers.
 If there is just the one number then it is used in both cases.
+If no numbers are given, the default value 8 is used.
 
+If the reference, after spaces have been removed, is longer than the maximum length
+then the filter passes the string onwards unchanged; the highway-symbol is not prepended.
+
 | height | `m=>ft` |
 This is exactly the same as the +conv+ filter, except that it prepends a special
 separation character before the value which is intended for elevations so that 
@@ -104,7 +107,7 @@
 | country-ISO |  |
 Use to normalize country names to the 3 character ISO 1366 code.
 The filter has no arguments. It uses the list in LocatorConfig.xml.
-Possible arguments are country names, or ISO codes in 2 or 3 characters,
+Possible inputs are country names, or ISO codes in 2 or 3 characters,
 for example "Deutschland", "Germany", "Bundesrepublik Deutschland", or "DE" 
 will all return "DEU", also different cases like "GERMANY" or "   germany " 
 will work.
@@ -118,7 +121,7 @@
 
 ....
 place=* {
-   name '${name} (${int_name\|not-equal:name})'
+   name '${name} (${int_name\|not-equal:"name"})'
        \| '${name}'
    }
 ....
@@ -130,11 +133,11 @@
 Extract part of the string. The start and end positions
 are counted starting from zero and the end position is not included.
 
-`${name\|substring:2:5}`
+`${name\|substring:"2:5"}`
 If the "name" was "Dorset Lane", then the result is "rse".  If there is just the one number,
 then the substring starts from that character until the end of the string.
 
-| not-contained | `separator tag` |
+| not-contained | `separator:tag` |
 Used to check for duplicate values. If the value of this tag is contained in the list being
 the value of the tag named as the argument to +not-contained+, then value
 of this tag is set to undefined.
@@ -142,7 +145,9 @@
 ....
 type=route & route=bus & ref=* {
    apply {
-      set route_ref='$(route_ref),${ref\|not-contained:,:route_ref}' \| '$(route_ref)' \| '${ref}';
+      set route_ref=
+         '$(route_ref),${ref\|not-contained:",:route_ref"}'
+             \| '$(route_ref)' \| '${ref}';
    }
 }
 ....
Index: doc/styles/rules.txt
===================================================================
--- doc/styles/rules.txt	(revision 4876)
+++ doc/styles/rules.txt	(working copy)
@@ -578,18 +578,14 @@
 one argument required then they are usually separated by colons too, but
 that is not a rule.
 
-+${tagname|filter:arg1:arg2}+
++${tagname|filter:"arg1:arg2"}+
 
 You can apply as many filter expressions to a substitution as you like.
 
 
-+${tagname|filter1:arg|filter2:arg}+
++${tagname|filter1:"f1Args"|filter2:"f2Args"}+
 
-If the argument contains spaces or symbols it should be quoted.
-
-+${tagname|filter1:"arg with spaces"}+
-
-For backward compatibility, most cases where you have spaces or symbols
+For backward compatibility, most argument strings
 do not actually need to be quoted, however we would recommend that you
 do for clarity.  If you need a pipe symbol or a closing curly backet,
 then you must use quotes.
@@ -714,8 +710,10 @@
 connect different regions, down to class 0 which is used for residential
 streets and other roads that you would only use for local travel.
 
-It is important for routing to work well that most roads are class 0 and
+It is important for routing to work well that most roads have lower classes and
 there are fewer and fewer roads in each of the higher classes.
+Also, the class of connector roads (links, roundabouts, ramps) matches
+the class of the highest class of roads being connected.  
 
 .Road classes
 [width="40%",frame="topbot",grid="rows",cols="<1,<4",options="header"]
@@ -724,7 +722,7 @@
 | 4 | Major HW/Ramp
 | 3 | Principal HW
 | 2 | Arterial St / Other HW
-| 1 | Roundabout / Collector
+| 1 | Minor or Service road
 | 0 | Residential Street / Unpaved road / Trail
 |=====
 
_______________________________________________
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to