3.10.5. PolygonSymbolizer

Table 28. PolygonSymbolizer Attributes
Attribute Value Default Description

fill

color

grey

fill-opacity

float

1.0

transform

SVG transformation

none

comp-op

SVG composition

none

gamma

float

1.0

gamma-method

power, linear, none, threshold, multiply

power

clip

boolean

false

simplify

float

0.0

simplify-algorithm

radial-distance, zhao-saalfeld, visvalingam-whyatt, douglas-peucker

radial-distance

smooth

float

0.0

Example 41. PolygonSymbolizer fill
<?xml version="1.0" encoding="utf-8"?>
<Map background-color="white">

  <Style name="style">
    <Rule>
      <PolygonSymbolizer fill="[fill]"/>
      <TextSymbolizer face-name="DejaVu Sans Book" allow-overlap="true" dy="50">[fill]</TextSymbolizer>
    </Rule>
  </Style>

  <Layer name="layer">
    <StyleName>style</StyleName>
    <Datasource>
      <Parameter name="type">csv</Parameter>
      <Parameter name="inline">
wkt,fill
"POLYGON(( 2 1, 1 3, 3 4, 5 3, 4 1, 2 1))",red
"POLYGON((12 1,11 3,13 4,15 3,14 1,12 1))",green
"POLYGON((22 1,21 3,23 4,25 3,24 1,22 1))",blue
      </Parameter>
    </Datasource>
  </Layer>

</Map>
fill
Example 42. PolygonSymbolizer fill opacity
<?xml version="1.0" encoding="utf-8"?>
<Map background-color="white">

  <Style name="style">
    <Rule>
      <PolygonSymbolizer fill="black" fill-opacity="[opacity]"/>
      <TextSymbolizer face-name="DejaVu Sans Book" allow-overlap="true" dy="50">[opacity]</TextSymbolizer>
    </Rule>
  </Style>

  <Layer name="layer">
    <StyleName>style</StyleName>
    <Datasource>
      <Parameter name="type">csv</Parameter>
      <Parameter name="inline">
wkt,opacity
"POLYGON(( 2 1, 1 3, 3 4, 5 3, 4 1, 2 1))",0.2
"POLYGON((12 1,11 3,13 4,15 3,14 1,12 1))",0.5
"POLYGON((22 1,21 3,23 4,25 3,24 1,22 1))",0.8
      </Parameter>
    </Datasource>
  </Layer>

</Map>
fill opacity
Example 43. PolygonSymbolizer smooth
<?xml version="1.0" encoding="utf-8"?>
<Map background-color="white">

  <Style name="style">
    <Rule>
      <PolygonSymbolizer smooth="[smooth]"/>
      <TextSymbolizer face-name="DejaVu Sans Book" allow-overlap="true" dy="50">[smooth]</TextSymbolizer>
    </Rule>
  </Style>

  <Layer name="layer">
    <StyleName>style</StyleName>
    <Datasource>
      <Parameter name="type">csv</Parameter>
      <Parameter name="inline">
wkt,smooth
"POLYGON(( 2 1, 1 3, 3 4, 5 3, 4 1, 2 1))",0.0
"POLYGON((12 1,11 3,13 4,15 3,14 1,12 1))",0.5
"POLYGON((22 1,21 3,23 4,25 3,24 1,22 1))",1.0
      </Parameter>
    </Datasource>
  </Layer>

</Map>
smooth