首页 文章

使用SVG符号通过SLD向GeoServer添加样式时出错

提问于
浏览
0

我正在尝试为我的点图层创建一个使用SVG符号的新样式 . 在尝试使用从QGIS生成的SLD文件验证样式时,出现以下错误:

ExternalGraphic的解析失败:java.net.MalformedURLException:未知协议:x

下面是我的SLD文件,有什么明显的东西给我这个错误吗?

<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd" xmlns:se="http://www.opengis.net/se">
  <NamedLayer>
    <se:Name>polling_stations</se:Name>
    <UserStyle>
      <se:Name>polling_stations</se:Name>
      <se:FeatureTypeStyle>
        <se:Rule>
          <se:Name>Single symbol</se:Name>
          <se:PointSymbolizer>
            <se:Graphic>
              <se:ExternalGraphic>
                <se:OnlineResource xlink:type="simple" xlink:href="X:/FunGis/Tools/Styles/svg/polling_stations.svg"/>
                <se:Format>image/svg+xml</se:Format>
              </se:ExternalGraphic>
              <se:Size>8.5</se:Size>
              <se:Displacement>
                <se:DisplacementX>0</se:DisplacementX>
                <se:DisplacementY>-4</se:DisplacementY>
              </se:Displacement>
            </se:Graphic>
          </se:PointSymbolizer>
        </se:Rule>
      </se:FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>

1 回答

  • 1

    X不是已知的协议 . 大概你想要file

相关问题