I want to control the order in which the features are being loaded and drawn on the map with the GeoServer vendor parameter sortBy.
I created a layer from an external WFS i'm not owner. So i'can't create a Z attribute in the data source.
Then, i created succesfully a custom attribute based on this documentation :
if_then_else(equalTo(MU_SHORT_FRE,'BR'),1,2)
Resulting WFS attributes view and datatype in QGIS
3.Now, i try to add the (validated parse) sld vendor parameter
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd" version="1.1.0" xmlns:se="http://www.opengis.net/se">
<NamedLayer>
<se:Name>Gemeentegrenzen</se:Name>
<UserStyle>
<se:Name>Gemeentegrenzen</se:Name>
<se:FeatureTypeStyle>
<se:Rule>
<se:Name>BR</se:Name>
<se:Description>
<se:Title>BR</se:Title>
</se:Description>
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>MU_SHORT_FRE</ogc:PropertyName>
<ogc:Literal>BR</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<se:PolygonSymbolizer>
<se:Stroke>
<se:SvgParameter name="stroke">#ff6283</se:SvgParameter>
<se:SvgParameter name="stroke-width">3</se:SvgParameter>
<se:SvgParameter name="stroke-linejoin">bevel</se:SvgParameter>
</se:Stroke>
</se:PolygonSymbolizer>
</se:Rule>
<se:Rule>
<se:Name></se:Name>
<se:ElseFilter xmlns:se="http://www.opengis.net/se"/>
<se:PolygonSymbolizer>
<se:Stroke>
<se:SvgParameter name="stroke">#000000</se:SvgParameter>
<se:SvgParameter name="stroke-width">1</se:SvgParameter>
<se:SvgParameter name="stroke-linejoin">bevel</se:SvgParameter>
</se:Stroke>
</se:PolygonSymbolizer>
</se:Rule>
<se:VendorOption name="sortBy">Z</se:VendorOption>
</se:FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
I get the following issue as the Z attribute does't exist. (If i write a non existing field name, i get the same issue).