1

I am trying to create this GeoServer layer style:

Desired final outcome

Obviously I can't achieve this by using shape://slash with PerpendicularOffset since that produces the following:

With shape://slash

I have found previous Q&As like Using Math in SLD file - wkt which suggested to use custom geometry defined with wkt://LINESTRING but when I try it, the particular geometry does not render at all.

Is it only possible to use WKT geometry with a GraphicFill instead of GraphicStroke or what am I doing wrong?

<LineSymbolizer>
    <Stroke>
        <GraphicStroke>
            <Graphic>
                <Mark>
                    <WellKnownName>wkt://LINESTRING(0 0, ${sin(Orientation) * 200} ${cos(Orientation) * 200})</WellKnownName>
                    <Stroke>
                        <CssParameter name="stroke">#DC33FF</CssParameter>
                        <CssParameter name="stroke-width">2</CssParameter>
                    </Stroke>
                </Mark>
                <Size>10</Size>
            </Graphic>
        </GraphicStroke>
     </Stroke>
     <PerpendicularOffset>-5</PerpendicularOffset>
 </LineSymbolizer>
2
  • is Orientation defined somewhere? try using that expression as a label to see if it is evaluating correctly
    – Ian Turton
    Commented Oct 3, 2022 at 12:22
  • is orientation in radians? can you add any errors you see in the log file or a picture of the results
    – Ian Turton
    Commented Oct 21, 2022 at 16:07

0

Your Answer

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

Browse other questions tagged or ask your own question.