popshade.sld 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <StyledLayerDescriptor version="1.0.0" xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc"
  3. xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml"
  4. xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">
  5. <NamedLayer>
  6. <Name>USA states population</Name>
  7. <UserStyle>
  8. <Name>population</Name>
  9. <Title>Population in the United States</Title>
  10. <Abstract>A sample filter that filters the United States into three
  11. categories of population, drawn in different colors</Abstract>
  12. <FeatureTypeStyle>
  13. <Rule>
  14. <Title>&lt; 2M</Title>
  15. <ogc:Filter>
  16. <ogc:PropertyIsLessThan>
  17. <ogc:PropertyName>PERSONS</ogc:PropertyName>
  18. <ogc:Literal>2000000</ogc:Literal>
  19. </ogc:PropertyIsLessThan>
  20. </ogc:Filter>
  21. <PolygonSymbolizer>
  22. <Fill>
  23. <!-- CssParameters allowed are fill (the color) and fill-opacity -->
  24. <CssParameter name="fill">#4DFF4D</CssParameter>
  25. <CssParameter name="fill-opacity">0.7</CssParameter>
  26. </Fill>
  27. </PolygonSymbolizer>
  28. </Rule>
  29. <Rule>
  30. <Title>2M - 4M</Title>
  31. <ogc:Filter>
  32. <ogc:PropertyIsBetween>
  33. <ogc:PropertyName>PERSONS</ogc:PropertyName>
  34. <ogc:LowerBoundary>
  35. <ogc:Literal>2000000</ogc:Literal>
  36. </ogc:LowerBoundary>
  37. <ogc:UpperBoundary>
  38. <ogc:Literal>4000000</ogc:Literal>
  39. </ogc:UpperBoundary>
  40. </ogc:PropertyIsBetween>
  41. </ogc:Filter>
  42. <PolygonSymbolizer>
  43. <Fill>
  44. <!-- CssParameters allowed are fill (the color) and fill-opacity -->
  45. <CssParameter name="fill">#FF4D4D</CssParameter>
  46. <CssParameter name="fill-opacity">0.7</CssParameter>
  47. </Fill>
  48. </PolygonSymbolizer>
  49. </Rule>
  50. <Rule>
  51. <Title>&gt; 4M</Title>
  52. <!-- like a linesymbolizer but with a fill too -->
  53. <ogc:Filter>
  54. <ogc:PropertyIsGreaterThan>
  55. <ogc:PropertyName>PERSONS</ogc:PropertyName>
  56. <ogc:Literal>4000000</ogc:Literal>
  57. </ogc:PropertyIsGreaterThan>
  58. </ogc:Filter>
  59. <PolygonSymbolizer>
  60. <Fill>
  61. <!-- CssParameters allowed are fill (the color) and fill-opacity -->
  62. <CssParameter name="fill">#4D4DFF</CssParameter>
  63. <CssParameter name="fill-opacity">0.7</CssParameter>
  64. </Fill>
  65. </PolygonSymbolizer>
  66. </Rule>
  67. <Rule>
  68. <Title>Boundary</Title>
  69. <LineSymbolizer>
  70. <Stroke>
  71. <CssParameter name="stroke-width">0.2</CssParameter>
  72. </Stroke>
  73. </LineSymbolizer>
  74. <TextSymbolizer>
  75. <Label>
  76. <ogc:PropertyName>STATE_ABBR</ogc:PropertyName>
  77. </Label>
  78. <Font>
  79. <CssParameter name="font-family">Times New Roman</CssParameter>
  80. <CssParameter name="font-style">Normal</CssParameter>
  81. <CssParameter name="font-size">14</CssParameter>
  82. </Font>
  83. <LabelPlacement>
  84. <PointPlacement>
  85. <AnchorPoint>
  86. <AnchorPointX>0.5</AnchorPointX>
  87. <AnchorPointY>0.5</AnchorPointY>
  88. </AnchorPoint>
  89. </PointPlacement>
  90. </LabelPlacement>
  91. </TextSymbolizer>
  92. </Rule>
  93. </FeatureTypeStyle>
  94. </UserStyle>
  95. </NamedLayer>
  96. </StyledLayerDescriptor>