Skip to content

Commit afe2e93

Browse files
authored
Merge pull request #1031 from PatrikSylve/class_fallback
Document FALLBACK keyword
2 parents 5678ba2 + 731d24d commit afe2e93

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

en/mapfile/class.txt

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
CLASS
88
*****************************************************************************
99

10+
:Last Updated: 2025-08-18
11+
1012
.. index::
1113
pair: CLASS; BACKGROUNDCOLOR
1214
:name: mapfile-class-backgroundcolor
@@ -90,10 +92,21 @@ EXPRESSION [string]
9092
.. note::
9193
|RUNSUB|
9294

95+
.. index::
96+
pair: CLASS; FALLBACK
97+
:name: mapfile-class-fallback
98+
99+
FALLBACK [true|false]
100+
Specifies whether the class should act as a fallback class.
101+
A fallback class is applied if and only if none of the previously
102+
defined classes has been applied. This is similar in concept to
103+
the :ref:`sld` ElseFilter.
104+
.. versionadded:: 8.5
105+
93106
.. index::
94107
pair: CLASS; GROUP
95108
:name: mapfile-class-group
96-
109+
97110
GROUP [string]
98111
Allows for grouping of classes. It is only used when a
99112
`CLASSGROUP` at the :ref:`LAYER` level is set. If the `CLASSGROUP`

en/ogc/sld.txt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
:Author: Jeff McKenna
1111
:Contact: jmckenna at gatewaygeomatics.com
1212
:Author: Yewondwossen Assefa
13-
:Last Updated: 2024-06-27
13+
:Last Updated: 2025-08-18
1414

1515
.. contents::
1616
:depth: 2
@@ -250,12 +250,12 @@ RasterSymbolizer Yes Applies for 8-bit rasters
250250
For each rule containing a filter, there is a class created with the
251251
class expression set to reflect that filter. Available filters that
252252
can be used are Comparison Filters and Logical Filters (see the
253-
:ref:`Filter Encoding HowTo <filter_encoding>`). The ElseFilter
254-
parameters are converted into a class in MapServer and placed at the
255-
end of the class list with no expression set. They are used to
256-
render elements that did not fit into any other classes.
253+
:ref:`Filter Encoding HowTo <filter_encoding>`). The ElseFilter
254+
parameters are converted into a class without an expression, placed
255+
at the end of the class list, and flagged as fallback. They are used
256+
to render elements that did not fit into any other classes.
257257

258-
- MinScaleDenomibator and MaxScaleDenominator are translated in minscale and
258+
- MinScaleDenominator and MaxScaleDenominator are translated in minscale and
259259
maxscale in MapServer.
260260

261261
The following are examples of valid requests using the Filters:
@@ -792,6 +792,8 @@ Other Items Implemented
792792
- Referencing an SLD file in the LAYER :ref:`STYLEITEM <mapfile-layer-styleitem>`
793793
- Reading SLD strings when from an attribute defined in the LAYER :ref:`STYLEITEM <mapfile-layer-styleitem>`
794794

795+
- Added the `FALLBACK` keyword in :ref:`CLASS <mapfile-class-fallback>` to support the functionality of `ElseFilter` in SLD.
796+
795797
Issues Found During Implementation
796798
==================================
797799

0 commit comments

Comments
 (0)