2

I am trying to give style to a vector point layer published on GeoServer and I can notice the displacement command is not working. (Displacement inside PointSymbolizer Graphic)

Do you know it could be any problem in the SLD file? or it could be GeoServer?

4
  • 1
    It would be much more easy to answer if you could share the whole SLD file.
    – user30184
    Nov 26, 2014 at 13:00
  • 1
    By looking at the SLD 1.0.0 schema schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd it looks like displacement is not supposed to be used in that place. It is meant for labels. I have not checked other SLD versions.
    – user30184
    Nov 26, 2014 at 13:09
  • I am working with sld 1.0.0. If I change the version to 1.1.0 openlayers 2.13.1 doesn't work and gives me this error: "Uncaught Can't find a SLD parser for version 1.1.0". What could I do? THanks for the comment! Nov 26, 2014 at 16:20
  • And if I publish the layer with that style 1.1.0 in Geoserver 2.6 it doesn't show the displacement either. Nov 26, 2014 at 17:42

1 Answer 1

1

SLD 1.0.0 specification can be downloaded from https://portal.opengeospatial.org/files/?artifact_id=1188

Read below what is written about the Graphic. In short, Displacement does not work because it is not supported for Graphic.

A Graphic is a “graphic symbol” with an inherent shape, color(s), and possibly size. A
“graphic” can be very informally defined as “a little picture” and can be of either a raster
or vector-graphic source type. The term “graphic” is used since the term “symbol” is
similar to “symbolizer” which is used in a different context in SLD. The high-level
definition of a Graphic element is:
<xs:element name="Graphic">
<xs:complexType>
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="sld:ExternalGraphic"/>
<xs:element ref="sld:Mark"/>
</xs:choice>
<xs:sequence>
<xs:element ref="sld:Opacity" minOccurs="0"/>
<xs:element ref="sld:Size" minOccurs="0"/>
<xs:element ref="sld:Rotation" minOccurs="0"/>
</xs:sequence>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ExternalGraphic">
<xs:complexType>
<xs:sequence>
<xs:element ref="sld:OnlineResource"/>
<xs:element ref="sld:Format"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Format" type="xs:string"/>
<xs:element name="Opacity" type="sld:ParameterValueType"/>
<xs:element name="Size" type="sld:ParameterValueType"/>
<xs:element name="Rotation" type="sld:ParameterValueType"/>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.