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.

Program: Fill a polygon with a hatch pattern
<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.

Table 1. Mark symbols suitable for hatch patterns
Name Hatch pattern Example

horline
shape://horline

A horizontal line

hatchFillHorlinePattern

vertline
shape://vertline

A vertical line

hatchFillVertlinePattern

slash
shape://slash

A forward-sloping diagonal line

hatchFillSlashPattern

backslash
shape://backslash

A backward-sloping diagonal line

hatchFillBackslashPattern

plus
shape://plus

A plus (+) symbol

hatchFillPlusPattern

times
shape://times

A times (x) symbol

hatchFillTimesPattern