1

'density' is a table column, which max value I want to get

<Rule>
    <ogc:Filter>
    <ogc:PropertyIsLessThan>
    <ogc:PropertyName>density</ogc:PropertyName>
    <ogc:Mul>
    <ogc:Function name="max">
    <ogc:PropertyName>density</ogc:PropertyName> 
    </ogc:Function>
    <ogc:Literal>0.166</ogc:Literal> 
    </ogc:Mul>
    </ogc:PropertyIsLessThan>
    </ogc:Filter>
    <PolygonSymbolizer>
    <Fill>
    <CssParameter name="fill">#96B6F3</CssParameter>
    <CssParameter name="fill-opacity">0.8</CssParameter>
    </Fill>
    </PolygonSymbolizer>
    </Rule>

Then I get message "Unable to find function max". What is incorrect?

Cold Pol
  • 13
  • 2

1 Answers1

0

The error is related to not declaring OGC namespace in StyleLayerDescriptor of your SLD file, so the max function cannot be resolved. Try adding following line as an attribute of StyleLayerDescriptor:

xmlns:ogc="http://www.opengis.net/ogc"
Nasser Tahani
  • 725
  • 12
  • 33