Project

General

Profile

1
<?xml version="1.0" encoding="ISO-8859-1"?>
2
<StyledLayerDescriptor version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd" xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
3
<!-- a named layer is the basic building block of an sld document -->
4
<NamedLayer>
5
<Name>A Test Layer</Name>
6

    
7
<!-- with in a layer you have Named Styles -->
8
<UserStyle>
9
    <!-- again they have names, titles and abstracts -->
10
  <Name>population</Name>
11
  <Title>Population in the United States</Title>
12
  <Abstract>A sample filter that filters the United States into three 
13
            categories of population, drawn in different colors</Abstract>
14
    <FeatureTypeStyle>
15
      <Rule>
16
        <!-- like a linesymbolizer but with a fill too -->
17
        <ogc:Filter xmlns:gml="http://www.opengis.net/gml">
18
          <ogc:PropertyIsBetween>
19
            <ogc:PropertyName>PERSONS</ogc:PropertyName>
20
            <ogc:LowerBoundary>
21
              <ogc:Literal>2000000</ogc:Literal>
22
            </ogc:LowerBoundary>
23
            <ogc:UpperBoundary>
24
              <ogc:Literal>4000000</ogc:Literal>
25
            </ogc:UpperBoundary>
26
          </ogc:PropertyIsBetween>
27
        </ogc:Filter>
28
        <PolygonSymbolizer>
29
           <Fill>
30
              <!-- CssParameters allowed are fill (the color) and fill-opacity -->
31
              <CssParameter name="fill">#FF0000</CssParameter>
32
           </Fill>     
33
        </PolygonSymbolizer>
34
      </Rule>
35
      <Rule>
36
        <!-- like a linesymbolizer but with a fill too -->
37
        <ogc:Filter xmlns:gml="http://www.opengis.net/gml">
38
          <ogc:PropertyIsLessThan>
39
           <ogc:PropertyName>PERSONS</ogc:PropertyName>
40
           <ogc:Literal>2000000</ogc:Literal>
41
          </ogc:PropertyIsLessThan>
42
        </ogc:Filter>
43
        <PolygonSymbolizer>
44
           <Fill>
45
              <!-- CssParameters allowed are fill (the color) and fill-opacity -->
46
              <CssParameter name="fill">#00FF00</CssParameter>
47
           </Fill>     
48
        </PolygonSymbolizer>
49
      </Rule>
50
      <Rule>
51
        <!-- like a linesymbolizer but with a fill too -->
52
        <ogc:Filter xmlns:gml="http://www.opengis.net/gml">
53
          <ogc:PropertyIsGreaterThan>
54
           <ogc:PropertyName>PERSONS</ogc:PropertyName>
55
           <ogc:Literal>4000000</ogc:Literal>
56
          </ogc:PropertyIsGreaterThan>
57
        </ogc:Filter>
58
        <PolygonSymbolizer>
59
           <Fill>
60
              <!-- CssParameters allowed are fill (the color) and fill-opacity -->
61
              <CssParameter name="fill">#0000FF</CssParameter>
62
           </Fill>     
63
        </PolygonSymbolizer>
64
      </Rule>
65
      <Rule>
66
        <LineSymbolizer>
67
           <Stroke/>    
68
        </LineSymbolizer>
69
      </Rule>
70
    </FeatureTypeStyle>
71
</UserStyle>
72
</NamedLayer>
73
</StyledLayerDescriptor>
74

    
(16-16/18)