statesblend.sld 4.3 KB

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