• geoserver点聚合样式sld


    【第六章 WebGIS】geoserver生成点聚合效果 - 知乎

    需要WPS插件,注意版本要对应 GeoServer,加压缩后的jar包放到geoserver的lib目录下,重启geoserver。

    原始默认样式

    聚合sld样式

    1. <?xml version="1.0" encoding="ISO-8859-1"?>
    2. <StyledLayerDescriptor version="1.0.0"
    3. xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
    4. xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc"
    5. xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    6. <NamedLayer>
    7. <Name>g_stacker</Name>
    8. <UserStyle>
    9. <Title>Point Stacker</Title>
    10. <Abstract>A sample style that aggregates points</Abstract>
    11. <FeatureTypeStyle>
    12. <Transformation>
    13. <ogc:Function name="gs:PointStacker">
    14. <ogc:Function name="parameter">
    15. <ogc:Literal>data</ogc:Literal>
    16. </ogc:Function>
    17. <ogc:Function name="parameter">
    18. <ogc:Literal>cellSize</ogc:Literal>
    19. <ogc:Literal>30</ogc:Literal> <!--聚合半径-->
    20. </ogc:Function>
    21. <ogc:Function name="parameter">
    22. <ogc:Literal>outputBBOX</ogc:Literal>
    23. <ogc:Function name="env">
    24. <ogc:Literal>wms_bbox</ogc:Literal>
    25. </ogc:Function>
    26. </ogc:Function>
    27. <ogc:Function name="parameter">
    28. <ogc:Literal>outputWidth</ogc:Literal>
    29. <ogc:Function name="env">
    30. <ogc:Literal>wms_width</ogc:Literal>
    31. </ogc:Function>
    32. </ogc:Function>
    33. <ogc:Function name="parameter">
    34. <ogc:Literal>outputHeight</ogc:Literal>
    35. <ogc:Function name="env">
    36. <ogc:Literal>wms_height</ogc:Literal>
    37. </ogc:Function>
    38. </ogc:Function>
    39. </ogc:Function>
    40. </Transformation>
    41. <Rule>
    42. <PointSymbolizer>
    43. <Graphic>
    44. <Mark>
    45. <WellKnownName>circle</WellKnownName>
    46. <Fill>
    47. <CssParameter name="fill">#0000FF</CssParameter>
    48. <CssParameter name="fill-opacity">0.5</CssParameter>
    49. </Fill>
    50. </Mark>
    51. <Size>25</Size>
    52. </Graphic>
    53. </PointSymbolizer>
    54. <TextSymbolizer>
    55. <Label>
    56. <ogc:PropertyName>countunique</ogc:PropertyName>
    57. </Label>
    58. <Font>
    59. <CssParameter name="font-family">Arial</CssParameter>
    60. <CssParameter name="font-size">12.0</CssParameter>
    61. <CssParameter name="font-style">normal</CssParameter>
    62. <CssParameter name="font-weight">normal</CssParameter>
    63. </Font>
    64. <LabelPlacement>
    65. <PointPlacement>
    66. <AnchorPoint>
    67. <AnchorPointX>0.5</AnchorPointX>
    68. <AnchorPointY>0.5</AnchorPointY>
    69. </AnchorPoint>
    70. <Displacement>
    71. <DisplacementX>0</DisplacementX>
    72. <DisplacementY>0</DisplacementY>
    73. </Displacement>
    74. <Rotation>
    75. <ogc:Literal>0.0</ogc:Literal>
    76. </Rotation>
    77. </PointPlacement>
    78. </LabelPlacement>
    79. <Halo>
    80. <Radius>2</Radius>
    81. <Fill>
    82. <CssParameter name="fill">#FFFFFF</CssParameter>
    83. </Fill>
    84. </Halo>
    85. <Fill>
    86. <CssParameter name="fill">#000000</CssParameter>
    87. </Fill>
    88. </TextSymbolizer>
    89. </Rule>
    90. </FeatureTypeStyle>
    91. </UserStyle>
    92. </NamedLayer>
    93. </StyledLayerDescriptor>

    结果样式

  • 相关阅读:
    高并发下秒杀商品,你必须知道的9个细节
    GBase 8a更新全文索引
    Unity3D Entity_CacheService实现详解
    Linux-c inotify监控目录和文件使用
    上海控安SmartRocket系列产品推介(六):SmartRocket PeneX汽车网络安全测试系统
    测试覆盖率治不好你的精神内耗
    makefile中ifeq ()函数异常问题
    html中行内元素、块级元素、行内快元素都有哪些,以及区别
    ADP出席第六届进博会跨境人才服务论坛|薪酬管理数字化加合规性,为跨境企业提升成本效率助长信心
    sql优化
  • 原文地址:https://blog.csdn.net/dragonzoebai/article/details/134456999