I am trying to style an GeometryCollection geometry data type from PotGIS table in Geoserver. I have not found any examples on the Internet how to do it nor is it supported in Geoserver or not. When I try to style it using standard PolygonSymbolizer, LineSymbolizer and PointSymbolizer I get strange behaviours. For example, filled non-closed linestrings, non-exitsting points appear on linestring etc. This is one example of my SLD file and rendered WMS request.
Am I doing something wrong in my SLD?
Is GeometryCollection supported in Geoserver?
Example of SLD:
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld 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>
<UserStyle>
<FeatureTypeStyle>
<Rule>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:Function name="geometryType">
<ogc:PropertyName>the_geom</ogc:PropertyName>
</ogc:Function>
<ogc:Literal>GeometryCollection</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<PolygonSymbolizer>
<Fill>
<CssParameter name="fill">#FF0000</CssParameter>
</Fill>
<Stroke>
<CssParameter name="stroke">#FFFFFF</CssParameter>
<CssParameter name="stroke-width">6</CssParameter>
</Stroke>
</PolygonSymbolizer>
<LineSymbolizer>
<Stroke>
<CssParameter name="fill">#00FF00</CssParameter>
<CssParameter name="stroke-width">2</CssParameter>
<CssParameter name="stroke-linejoin">round</CssParameter>
<CssParameter name="stroke-linecap">round</CssParameter>
</Stroke>
</LineSymbolizer>
<PointSymbolizer>
<Graphic>
<Mark>
<WellKnownName>circle</WellKnownName>
<Fill>
<CssParameter name="fill">#0000FF</CssParameter>
</Fill>
</Mark>
<Size>9</Size>
</Graphic>
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
Rendered WMS request with provided SLD file: