使用 SVG 符号通过 SLD 向 GeoServer 添加样式时出错
Error when adding style to GeoServer through SLD using SVG symbol
我正在尝试为使用 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>
X 不是已知协议。大概你想要 file
我正在尝试为使用 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>
X 不是已知协议。大概你想要 file