【问题标题】:how to fill color in sld with the feature's attribute如何用特征的属性在 sld 中填充颜色
【发布时间】:2013-08-22 06:57:00
【问题描述】:

例如: 这是一个像这样的草特征:

  • id,面积,等级
  • 1,几何,24
  • 2,几何,56
  • ...

我不想写一个根据属性级别显示颜色的 sld 文件,像这样:

<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor version="1.0.0" 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"
  xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">
  <NamedLayer>
    <Name>grass</Name>
    <UserStyle>
      <Name>grass</Name>
      <Title>grass polygon</Title>
      <Abstract>grass fill with level</Abstract>
      <FeatureTypeStyle>
        <Rule>
          <PolygonSymbolizer>
            <Fill>
              <CssParameter name="fill">rgb(**level**, 0, 255)</CssParameter>
            </Fill>
            <Stroke />
          </PolygonSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>

【问题讨论】:

标签: colors gis fill geoserver sld


【解决方案1】:

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-09-03
    • 1970-01-01
    • 1970-01-01
    • 2011-07-09
    • 2019-09-03
    • 1970-01-01
    • 2012-02-06
    相关资源
    最近更新 更多