Geoserver sld styling: polygon boundary with shapes aiming to the interior

Is there any way to create a style with such a stroke for polygon boundary that special symbols like triangles are drawn always with one vertex towards the polygon interior?
It appears that geoserver correctly determines the polygon interior since it correctly fills it but doesn’t unify boundary polyline vertex order (it sometimes clockwise, sometimes counterclockwise..)
So the triangle from symbolizer below can point to exterior for some polygons.
Is there a way to determine polyline orientation in sld?

Thanks in advance.


     <se:PolygonSymbolizer>
            <se:Stroke>
              <se:GraphicStroke>
                <se:Graphic>
                  <se:Mark>
                    <se:WellKnownName>wkt://MULTILINESTRING((-2 0, 2 0),(-1 0, 0 -1.44), (0 -1.44, 1 0))</se:WellKnownName>
                    <se:Stroke>
                      <se:SvgParameter name="stroke">#c545c3</se:SvgParameter>
                      <se:SvgParameter name="stroke-width">1</se:SvgParameter>
                    </se:Stroke>
                  </se:Mark>
                  <se:Size>9</se:Size>
                </se:Graphic>
              </se:GraphicStroke>
              <se:SvgParameter name="stroke-dasharray">10 30 10 30 10 60</se:SvgParameter>
            </se:Stroke>
          </se:PolygonSymbolizer>

  • Off the top of my head there isn’t a way to do that, the easiest way is to fix the polygons orientation in the data source.

    – 

Leave a Comment