I've a PostGIS table published as a layer, I need to style this layer using SLD. I need to call a custom OWS function (which I wrote) from inside the SLD. It should look something like:
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd"
xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<NamedLayer>
<Name>test_fn_call</Name>
<UserStyle>
<Title>dark yellow square point style</Title>
<FeatureTypeStyle>
<Rule>
<Title>dark yellow point</Title>
<PointSymbolizer>
<Graphic>
<Mark>
<WellKnownName>square</WellKnownName>
<Fill>
<CssParameter name="fill">#99cc00</CssParameter>
</Fill>
</Mark>
<Size>
<ogc:Function name="gs:calcSize">
<ogc:Function name="parameter">
<!-- **** What should I write here? **** -->
</ogc:Function>
</ogc:Function>
</Size>
</Graphic>
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
calcSize is a function to calculate point size depending on some calculations on the feature's fields.
My question is what should I write as a parameter of this function, actually I need to path the current feature as a parameter, so what should I write in the SLD as a parameter?
Also in the java side, what should the parameter type be?