Hi everybody
I have a layer in GeoServer which is stored in a PostGIS database. The
geometrytype of the layer is GEOMETRY and now the table only contains
LINESTRING. But I what to add points and polygons to the table, this is
the reason I choose GEOMETRY as the geometrytype. My layer is working
fine in the Layer Preview...
But when I do a GetLegendGraphic request I get the following
ServiceException:
java.lang.IllegalArgumentException: class
com.vividsolutions.jts.geom.Geometry is not supported by this method
class com.vividsolutions.jts.geom.Geometry is not supported by this
method
My SLD is quite simple:
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
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"
xsi:schemaLocation="http://www.opengis.net/sld
http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">
<NamedLayer>
<Name></Name>
<UserStyle>
<Abstract></Abstract>
<FeatureTypeStyle>
<Rule>
<Title>Test</Title>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>feature_type</ogc:PropertyName>
<ogc:Literal>Test</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">#FFA618</CssParameter>
<CssParameter name="stroke-width">2</CssParameter>
<CssParameter name="stroke-dasharray">5 2</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
This filter only selects the lines.
My GetLegendGraphic request is:
http://localhost:8080/geoserver/wms?REQUEST=GetLegendGraphic&VERSION=1.0
.0&FORMAT=image/png&WIDTH=16&HEIGHT=16&LAYER=namespace:layer
I have tried the request on a GeoServer 2.0.1 and a GeoServer 2.0.2 and
in both cases I get ServiceException as above mentioned.
I have also tried with a filter on the geometrytype like this:
<ogc:PropertyIsEqualsTo>
<ogc:Function name="geometryType">
<ogc:PropertyName>geom</ogc:PropertyName>
</ogc:Function>
<ogc:Literal>LineString</ogc:Literal>
</ogc:PropertyIsEqualsTo>
But I still get the same ServiceException.
What can I do to get the request working? Or is this a bug?
Any help or comment would be much appreciated.
Regards Esben
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users