[Qgis-user] Problems saving layer style as SLD for use in Geoserver 2.5
Chris Buckmaster
chris.buckmaster at runnymede.gov.uk
Fri Sep 11 06:51:25 PDT 2015
Hi
I am trying to style my layers in Geoserver with the SLD files I am creating through QGIS but am encountering some errors, for example when using diagonal lines for a polygon layer:-
* Parsing failed for Filter: java.lang.RuntimeException: Unable to find function Literal
* line 23: cvc-complex-type.2.4.a: Invalid content was found starting with element 'ogc:Filter'. One of '{"http://www.opengis.net/ogc":expression}' is expected.
* line 24: cvc-complex-type.2.4.a: Invalid content was found starting with element 'ogc:Literal'. One of '{"http://www.opengis.net/ogc":spatialOps, "http://www.opengis.net/ogc":comparisonOps, "http://www.opengis.net/ogc":logicOps, "http://www.opengis.net/ogc":_Id}' is expected.
I have read that there are some issues when trying to use SLD generated files from QGIS in Geoserver as they are not set in the correct standard? Is that right? Are there any plugins that might export the styles out for use in Geoserver? I don't really want to have to write all my styles from scratch :(
My SLD is below:-
<?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" version="1.1.0" 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" xmlns:se="http://www.opengis.net/se">
<NamedLayer>
<se:Name>air_quality_management_areas</se:Name>
<UserStyle>
<se:Name>air_quality_management_areas</se:Name>
<se:FeatureTypeStyle>
<se:Rule>
<se:Name>Single symbol</se:Name>
<se:PolygonSymbolizer>
<se:Fill>
<se:GraphicFill>
<se:Graphic>
<se:Mark>
<se:WellKnownName>horline</se:WellKnownName>
<se:Stroke>
<se:SvgParameter name="stroke">#5c98e6</se:SvgParameter>
<se:SvgParameter name="stroke-width">0.25</se:SvgParameter>
</se:Stroke>
</se:Mark>
<se:Size>5</se:Size>
<se:Rotation>
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
<ogc:Literal>45</ogc:Literal>
</ogc:Filter>
</se:Rotation>
</se:Graphic>
</se:GraphicFill>
</se:Fill>
</se:PolygonSymbolizer>
<se:PolygonSymbolizer>
<se:Fill>
<se:GraphicFill>
<se:Graphic>
<se:Mark>
<se:WellKnownName>horline</se:WellKnownName>
<se:Stroke>
<se:SvgParameter name="stroke">#5c98e6</se:SvgParameter>
<se:SvgParameter name="stroke-width">0.25</se:SvgParameter>
</se:Stroke>
</se:Mark>
<se:Size>5</se:Size>
<se:Rotation>
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
<ogc:Literal>135</ogc:Literal>
</ogc:Filter>
</se:Rotation>
<se:Displacement>
<se:DisplacementX>0</se:DisplacementX>
<se:DisplacementY>0</se:DisplacementY>
</se:Displacement>
</se:Graphic>
</se:GraphicFill>
</se:Fill>
</se:PolygonSymbolizer>
<se:LineSymbolizer>
<se:Stroke>
<se:SvgParameter name="stroke">#5c98e6</se:SvgParameter>
<se:SvgParameter name="stroke-width">0.5</se:SvgParameter>
<se:SvgParameter name="stroke-linejoin">bevel</se:SvgParameter>
<se:SvgParameter name="stroke-linecap">square</se:SvgParameter>
</se:Stroke>
</se:LineSymbolizer>
</se:Rule>
</se:FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
Thanks, Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20150911/58f84994/attachment.html>
More information about the Qgis-user
mailing list