![]() |
MapLink Pro Studio 11.1
|
The generation of labels and entity names depends on specifying which attributes to use and how to use them in each case. The single attribute usage is defined by a relatively simple syntax of the form
"{" + pre_text + "%" + attribute_id + value_selector + index_selector + "%" + post_text + "}"
This form is known as an attribute statement.
All items in quotes must be provided as is and are obligatory.
pre_text |
The text to add before the attribute value. This is optional. |
attribute_id |
This is a two character string uniquely defining the attribute to use. This item is obligatory. |
value_selector |
This is a single character which allows the user to select only those attribute values which start with the given character. A special case is the use of the "*" character. This indicates that all attribute values are acceptable. This item is optional. |
index_selector |
This is a single digit which allows the user to select which of the acceptable attribute values to use. A special case is the use of the "*" character. This indicates that all attribute values are acceptable. This item is optional. Note this can only be used in conjunction with the value_selector. |
post_text |
The text to add after the attribute value. |
The best way to describe the syntax is to give examples
Consider a road which has the following attributes
"ON" Cellar Strasse
"AN" Cellar Road
"RN" A7 E45 A24 L101 ( this is not unusual in GDF )
"FW" 2
The following label definitions could be used
{%FW%} = 2
pre_text not used
attribute_id FW
value_selector not used
index selector not used
post_text not used
Note : typically such a simple attribute definition would be used as a means of finding common features in the line merging stage of label generation.
{%RN%} = A7 E45 A24 L101
pre_text not used
attribute_id RN
value_selector not used
index selector not used
post_text not used
Note that all values for RN are given since no value_selector was provided.
{Route %RNA1%}= Route A7
pre_text Route
attribute_id RN
value_selector A only accept values which begin with "A"
index selector 1 only accept the first value that begins with "A"
post_text not used
{Road is called %ON% OK!} = Road is called Cellar Strasse OK!
pre_text Road is called
attribute_id ON
value_selector not used
index selector not used
post_text OK!
Combining attribute statements
Single attribute statements can be combined to form attribute expressions.
Two types of combination are allowed additive or selective. Additive statements are made by use of the + sign, selective statements simply pair two single statements by position. In an expression if one statement is not satisfied then it will be ignored.
Selective statements have a higher priority than additive statements. This is important when combining single statements since the result may be subtly different.
A + B C means A and ( B or C )
B + A C means B and ( A or C )
A+B C+D mean A and ( B or C ) and D
As in single attribute statements the best way to explain attribute expressions is by example.
Consider two road elements with the following attributes
Road 1
"ON" Cellar Strasse
"AN" Cellar Road
"RN" A7 E45 A24 L101
"FW" 2
Road 2
"ON" Berliner Alle
"AN" Main Street
"RN" A7
"FW" 2
Examples of additive combinations are:
{Route %RN*1%} + { ( %RN*2% ) }
Road 1 = Route A7 (E45)
{Route %RN%} + {( %ON% )}
Road 1 = Route A7 E45 A24 L101 (Cellar Strasse )
Road 2 = Route A7 ( Berliner Alle)
Examples of selective statements are
{Route %RNE1%} { %ON% }
Road 1 = Route E45
Road 2 = Berliner Alle
{Route %RNA1%} { %ON% }
Road 1 = Route A7
Road 2 = Route A7
Additive and selective combinations may be combined
{%RNA1%}+{%RNE1%} { %ON% }
Road 1 = A7 E45
Road 2 = A7 Berliner Alle