To style polygons in SLD, you can use a PolygonSymbolizer
, which includes settings to configure the styling of the polygon interior and its border.
With GraphicFill
, it’s possible to specify an image or symbol for use in a repeated fill pattern.
A common use case is defining a hatch pattern with a line-based mark symbol.
<PolygonSymbolizer>
<Fill>
<GraphicFill>
<Graphic>
<Mark>
<WellKnownName>shape://horline</WellKnownName>
<Stroke>
<SvgParameter name="stroke">#0000FF</SvgParameter>
<SvgParameter name="stroke-width">0.5</SvgParameter>
</Stroke>
</Mark>
<Size>8</Size>
</Graphic>
</GraphicFill>
</Fill>
<Stroke>
<SvgParameter name="stroke">#0000FF</SvgParameter>
<SvgParameter name="stroke-width">0.5</SvgParameter>
</Stroke>
</PolygonSymbolizer>
This PolygonSymbolizer
repeats a horizontal line symbol to create a hatch pattern.
Table 1, “Mark symbols suitable for hatch patterns” provides an overview of the mark symbols supported in LuciadLightspeed and LuciadFusion.
Name | Hatch pattern | Example |
---|---|---|
|
A horizontal line |
![]() |
|
A vertical line |
![]() |
|
A forward-sloping diagonal line |
![]() |
|
A backward-sloping diagonal line |
![]() |
|
A plus (+) symbol |
![]() |
|
A times (x) symbol |
![]() |