![]() |
Home | Docs | Issue Tracker | FAQ | Download |
![]() ![]() ![]() ![]() ![]() |
Enables debugging of the class object. Verbose output is generated and sent to the standard error output (STDERR) or the MapServer logfile if one is set using the LOG parameter in the WEB object.
EXPRESSION [string]
Four types of expressions are now supported to define which class a feature belongs to: String comparisons, regular expressions, logical expressions, and string functions (see Expressions). If no expression is given, then all features are said to belong to this class.
String comparisons are case sensitive and are the fastest to evaluate. No special delimiters are necessary although strings must be quoted if they contain special characters. (As a matter of good habit, it is recommended that you quote all strings). The attribute to use for comparison is defined in the LAYER CLASSITEM parameter.
Regular expression are limited using slashes (/regex/). The attribute to use for comparison is defined in the LAYER CLASSITEM parameter.
Logical expressions allow the building of fairly complex tests based on one or more attributes and therefore are only available with shapefiles. Logical expressions are delimited by parentheses “(expression)”. Attribute names are delimited by square brackets “[ATTRIBUTE]”. Attribute names are case sensitive and must match the items in the shapefile. For example:
EXPRESSION ([POPULATION] > 50000 AND '[LANGUAGE]' eq 'FRENCH')The following logical operators are supported: =, >, <, <=, >=, =, or, and, lt, gt, ge, le, eq, ne, in, ~, ~*. As one might expect, this level of complexity is slower to process.
One string function exists: length(). It computes the length of a string:
EXPRESSION (length('[NAME_E]') < 8)String comparisons and regular expressions work from the classitem defined at the layer level. You may mix expression types within the different classes of a layer.
Allows for grouping of classes. It is only used when a CLASSGROUP at the LAYER level is set. If the CLASSGROUP parameter is set, only classes that have the same group name would be considered at rendering time. An example of a layer with grouped classes might contain:
LAYER
...
CLASSGROUP "group1"
...
CLASS
NAME "name1"
GROUP "group1"
...
END
CLASS
NAME "name2"
GROUP "group2"
...
END
CLASS
NAME "name3"
GROUP "group1"
...
END
...
END # layer
Minimum scale at which this CLASS is drawn. Scale is given as the denominator of the actual scale fraction, for example for a map at a scale of 1:24,000 use 24000. Implemented in MapServer 5.0, to replace the deprecated MAXSCALE parameter.
See also
Since MapServer 5.0 the proper parameter to use is MAXSCALEDENOM instead. The deprecated MAXSCALE is the minimum scale at which this class is drawn. Scale is given as the denominator of the actual scale fraction, for example for a map at a scale of 1:24,000 use 24000.
Deprecated since version 5.0.
Maximum scale at which this CLASS is drawn. Scale is given as the denominator of the actual scale fraction, for example for a map at a scale of 1:24,000 use 24000. Implemented in MapServer 5.0, to replace the deprecated MINSCALE parameter.
See also
Since MapServer 5.0 the proper parameter to use is MINSCALEDENOM instead. The deprecated MINSCALE is the maximum scale at which this CLASS is drawn. Scale is given as the denominator of the actual scale fraction, for example for a map at a scale of 1:24,000 use 24000.
Deprecated since version 5.0.
The symbol name or number to use for all features if attribute tables are not used. The number is the index of the symbol in the symbol file, starting at 1, the 5th symbol in the file is therefore symbol number 5. You can also give your symbols names using the NAME parameter in the symbol definition file, and use those to refer to them. Default is 0, which results in a single pixel, single width line, or solid polygon fill, depending on layer type.
You can also specify a gif or png filename. The path is relative to the location of the mapfile.
See Cartographical Symbol Construction with MapServer for more information on advanced symbol construction.
Text to label features in this class with. This overrides values obtained from the LAYER LABELITEM. The string can contain references to feature attributes. This allows you to concatenate multiple attributes into a single label. You can for example concatenate the attributes FIRSTNAME and LASTNAME like this:
TEXT '[FIRSTNAME] [LASTNAME]'
More advanced Expressions can be used to specify the labels. Since version 6.0, there are functions available for formatting numbers:
TEXT ("Area is: " + tostring([area],"%.2f"))
Signals the start of a VALIDATION block.
As of MapServer 5.4.0, VALIDATION blocks are the preferred mechanism for specifying validation patterns for CGI param runtime substitutions. See Run-time Substitution.
Although the recommended way of making stacked symbols to achieve interesting effects is to use STYLEs, you can also “stack” 2 symbols without using STYLEs. You define the second symbol, which effectively sits “on top” of the first symbol (as defined above).
The following parameters allow you to define the second symbol, and they are equivalent to their non-overlay counterparts: