From d4b71e3d18baf7f4e5d495a41120cdb7b668ab97 Mon Sep 17 00:00:00 2001 From: Patrik Sylve Date: Mon, 18 Aug 2025 11:07:19 +0200 Subject: [PATCH 1/2] Document FALLBACK keyword --- en/mapfile/class.txt | 11 ++++++++++- en/ogc/sld.txt | 14 ++++++++------ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/en/mapfile/class.txt b/en/mapfile/class.txt index ad233ef4c62..79c5fe1be6f 100644 --- a/en/mapfile/class.txt +++ b/en/mapfile/class.txt @@ -7,6 +7,8 @@ CLASS ***************************************************************************** +:Last Updated: 2025-08-18 + .. index:: pair: CLASS; BACKGROUNDCOLOR :name: mapfile-class-backgroundcolor @@ -93,7 +95,14 @@ EXPRESSION [string] .. index:: pair: CLASS; GROUP :name: mapfile-class-group - + +FALLBACK [true|false] + Specifies whether the class should act as a fallback class. + A fallback class is applied if and only if none of the previously + defined classes has been applied. This is similar in concept to + the :ref:`sld` ElseFilter. + .. versionadded:: 8.5 + GROUP [string] Allows for grouping of classes. It is only used when a `CLASSGROUP` at the :ref:`LAYER` level is set. If the `CLASSGROUP` diff --git a/en/ogc/sld.txt b/en/ogc/sld.txt index 142596cebad..b5b26378e7a 100644 --- a/en/ogc/sld.txt +++ b/en/ogc/sld.txt @@ -10,7 +10,7 @@ :Author: Jeff McKenna :Contact: jmckenna at gatewaygeomatics.com :Author: Yewondwossen Assefa -:Last Updated: 2024-06-27 +:Last Updated: 2025-08-18 .. contents:: :depth: 2 @@ -250,12 +250,12 @@ RasterSymbolizer Yes Applies for 8-bit rasters For each rule containing a filter, there is a class created with the class expression set to reflect that filter. Available filters that can be used are Comparison Filters and Logical Filters (see the - :ref:`Filter Encoding HowTo `). The ElseFilter - parameters are converted into a class in MapServer and placed at the - end of the class list with no expression set. They are used to - render elements that did not fit into any other classes. + :ref:`Filter Encoding HowTo `). The ElseFilter + parameters are converted into a class without an expression, placed + at the end of the class list, and flagged as fallback. They are used + to render elements that did not fit into any other classes. -- MinScaleDenomibator and MaxScaleDenominator are translated in minscale and +- MinScaleDenominator and MaxScaleDenominator are translated in minscale and maxscale in MapServer. The following are examples of valid requests using the Filters: @@ -792,6 +792,8 @@ Other Items Implemented - Referencing an SLD file in the LAYER :ref:`STYLEITEM ` - Reading SLD strings when from an attribute defined in the LAYER :ref:`STYLEITEM ` +- Added the `FALLBACK` keyword in :ref:`CLASS` to support the functionality of `ElseFilter` in SLD. + Issues Found During Implementation ================================== From 731d24db4e9b7888242f03084c3eac89b4d60024 Mon Sep 17 00:00:00 2001 From: Patrik Sylve Date: Mon, 18 Aug 2025 15:04:41 +0200 Subject: [PATCH 2/2] Added FALLBACK index --- en/mapfile/class.txt | 8 ++++++-- en/ogc/sld.txt | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/en/mapfile/class.txt b/en/mapfile/class.txt index 79c5fe1be6f..5db0dbabd44 100644 --- a/en/mapfile/class.txt +++ b/en/mapfile/class.txt @@ -93,8 +93,8 @@ EXPRESSION [string] |RUNSUB| .. index:: - pair: CLASS; GROUP - :name: mapfile-class-group + pair: CLASS; FALLBACK + :name: mapfile-class-fallback FALLBACK [true|false] Specifies whether the class should act as a fallback class. @@ -103,6 +103,10 @@ FALLBACK [true|false] the :ref:`sld` ElseFilter. .. versionadded:: 8.5 +.. index:: + pair: CLASS; GROUP + :name: mapfile-class-group + GROUP [string] Allows for grouping of classes. It is only used when a `CLASSGROUP` at the :ref:`LAYER` level is set. If the `CLASSGROUP` diff --git a/en/ogc/sld.txt b/en/ogc/sld.txt index b5b26378e7a..a17bebdcc84 100644 --- a/en/ogc/sld.txt +++ b/en/ogc/sld.txt @@ -792,7 +792,7 @@ Other Items Implemented - Referencing an SLD file in the LAYER :ref:`STYLEITEM ` - Reading SLD strings when from an attribute defined in the LAYER :ref:`STYLEITEM ` -- Added the `FALLBACK` keyword in :ref:`CLASS` to support the functionality of `ElseFilter` in SLD. +- Added the `FALLBACK` keyword in :ref:`CLASS ` to support the functionality of `ElseFilter` in SLD. Issues Found During Implementation ==================================