I'm trying to set up a drawing rule to draw a line with regular perpendicular lines sprouting from one side of it. The SLD is this:
<FeatureTypeStyle>
<FeatureTypeName>MurLoddrett</FeatureTypeName>
<Rule>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">#000000</CssParameter>
<CssParameter name="stroke-width">0.2</CssParameter>
</Stroke>
<PerpendicularOffset>0</PerpendicularOffset>
</LineSymbolizer>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">#000000</CssParameter>
<CssParameter name="stroke-width">30.0</CssParameter>
<CssParameter name="stroke-dasharray">0.2 80.0</CssParameter>
<CssParameter name="stroke-dashoffset">0</CssParameter>
</Stroke>
<PerpendicularOffset>15.0</PerpendicularOffset>
</LineSymbolizer>
</Rule>
</FeatureTypeStyle>
The second LineSymbolizer is designed to overlay a wide line with short dashes, shifted to the side, thus giving the right effect.
However, when I try to validate the style, GeoServer (2.0.2) throws this error: "org.xml.sax.SAXParseException: cvc-complex-type.2.4.d: Invalid content was found starting with element 'PerpendicularOffset'. No child element is expected at this point.", and when the map is rendered the offset is ignored entirely. (Which means it appears as normal hatching lines centered on the main line.)
Is my SLD wrong or is this a bug?
Regards,
Robert Nordan
On Tue, Jun 29, 2010 at 10:07 AM, Robert Nordan <robert.nordan@anonymised.com> wrote:
I'm trying to set up a drawing rule to draw a line with regular perpendicular lines sprouting from one side of it. The SLD is this:
Is my SLD wrong or is this a bug?
Your SLD is wrong. You can only use a PerpendicularOffset as part of a
textsymbolizer.
See http://portal.opengeospatial.org/files/?artifact_id=1188 for more details.
Ian
--
Ian Turton
Robert Nordan ha scritto:
I'm trying to set up a drawing rule to draw a line with regular
perpendicular lines sprouting from one side of it. The SLD is this:
<FeatureTypeStyle> <FeatureTypeName>MurLoddrett</FeatureTypeName> <Rule> <LineSymbolizer> <Stroke> <CssParameter
name="stroke">#000000</CssParameter> <CssParameter
name="stroke-width">0.2</CssParameter> </Stroke> <PerpendicularOffset>0</PerpendicularOffset> </LineSymbolizer> <LineSymbolizer> <Stroke> <CssParameter
name="stroke">#000000</CssParameter> <CssParameter
name="stroke-width">30.0</CssParameter> <CssParameter
name="stroke-dasharray">0.2 80.0</CssParameter> <CssParameter
name="stroke-dashoffset">0</CssParameter> </Stroke> <PerpendicularOffset>15.0</PerpendicularOffset> </LineSymbolizer> </Rule> </FeatureTypeStyle>
The second LineSymbolizer is designed to overlay a wide line with
short dashes, shifted to the side, thus giving the right effect.
However, when I try to validate the style, GeoServer (2.0.2) throws
this error: "org.xml.sax.SAXParseException: cvc-complex-type.2.4.d:
Invalid content was found starting with element
'PerpendicularOffset'. No child element is expected at this point.",
and when the map is rendered the offset is ignored entirely. (Which
means it appears as normal hatching lines centered on the main line.)
Is my SLD wrong or is this a bug?
The SLD is wrong. There is no perpendicularOffset element in SLD 1.0,
what you're referring to is SE 1.1 but we don't support it
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.
Aha, I'm sorry to hear that. Well, I have to ask the obvious follow-up questions:
1) Are there any plans to implement SLD 1.1 and Symbology Encoding in the near future? (I see it has been included in GeoAPI for over a year.)
2) Does anyone have any good ideas for how to alternatively achieve the effect I want in GeoServer?
/Robert
-----Opprinnelig melding-----
Fra: Andrea Aime [mailto:aaime@anonymised.com]
Sendt: 29. juni 2010 17:00
Til: Robert Nordan
Kopi: geoserver-users@lists.sourceforge.net
Emne: Re: [Geoserver-users] PerpendicularOffset and SLD validation
Robert Nordan ha scritto:
I'm trying to set up a drawing rule to draw a line with regular
perpendicular lines sprouting from one side of it. The SLD is this:
<FeatureTypeStyle> <FeatureTypeName>MurLoddrett</FeatureTypeName>
<Rule> <LineSymbolizer> <Stroke> <CssParameter
name="stroke">#000000</CssParameter> <CssParameter
name="stroke-width">0.2</CssParameter> </Stroke>
<PerpendicularOffset>0</PerpendicularOffset> </LineSymbolizer>
<LineSymbolizer> <Stroke> <CssParameter
name="stroke">#000000</CssParameter> <CssParameter
name="stroke-width">30.0</CssParameter> <CssParameter
name="stroke-dasharray">0.2 80.0</CssParameter> <CssParameter
name="stroke-dashoffset">0</CssParameter> </Stroke>
<PerpendicularOffset>15.0</PerpendicularOffset> </LineSymbolizer>
</Rule> </FeatureTypeStyle>
The second LineSymbolizer is designed to overlay a wide line with
short dashes, shifted to the side, thus giving the right effect.
However, when I try to validate the style, GeoServer (2.0.2) throws
this error: "org.xml.sax.SAXParseException: cvc-complex-type.2.4.d:
Invalid content was found starting with element
'PerpendicularOffset'. No child element is expected at this point.",
and when the map is rendered the offset is ignored entirely. (Which
means it appears as normal hatching lines centered on the main line.)
Is my SLD wrong or is this a bug?
The SLD is wrong. There is no perpendicularOffset element in SLD 1.0,
what you're referring to is SE 1.1 but we don't support it
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.
Robert Nordan ha scritto:
Aha, I'm sorry to hear that. Well, I have to ask the obvious
follow-up questions:
1) Are there any plans to implement SLD 1.1 and Symbology Encoding in
the near future? (I see it has been included in GeoAPI for over a
year.)
I don't know of anyone with plans to support SLD 1.1 in the near
future. Things might change overnight if we find a sponsor though.
2) Does anyone have any good ideas for how to alternatively
achieve the effect I want in GeoServer?
Geometry transformations:
http://blog.geoserver.org/2010/03/17/extending-your-map-styling-with-geometry-transformations/
However we don't have a "single side buffer" transformation function
at the moment, that needs to be developed
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.