[mapserver-users] Anyone have an example of SLD to symbolize a line from an ArcServer service?
Basques, Bob (CI-StPaul)
bob.basques at ci.stpaul.mn.us
Wed Feb 22 12:24:00 PST 2017
I can’t seem to get a Line symbolizer to do what I want (make something red based on a parameter value in the WMS service.
I’m not getting an error, the SLD validates for XML, but I simply get back the default styling from the server.
My Mapfile:
MAP
STATUS ON
PROJECTION
"init=epsg:200068"
END
LAYER
NAME "WS Service Laterals"
TYPE RASTER
STATUS DEFAULT
INCLUDE "../wsgisserver2.inc" ## CONNECTION
CONNECTIONTYPE WMS
METADATA
"wms_srs" "EPSG:26915"
"wms_name" "3"
"wms_server_version" "1.1.1"
"wms_format" "image/png24"
"wms_sld_url" "http://gis.ci.stpaul.mn.us/datasets/UTILITIES_COMM/WATER_UTILITY/SERVICE_LATERALS/sld.line.label.01.xml"
#"wms_sld_body" "AUTO"
"ows_title" "3"
"gml_include_items" "all"
END
PROJECTION
"init=epsg:26915"
END
TEMPLATE "dummy"
END #layer
END
My SLD
(assembled from ESRI web site examples found here: http://server.arcgis.com/en/server/10.3/publish-services/linux/wms-styled-layer-descriptor-sld-samples.htm#GUID-D8E390C5-8F1C-4D1D-8120-D5AE98F4041B):
<?xml version="1.0" encoding="UTF-8"?>
<sld:StyledLayerDescriptor version="1.0.0" xmlns="http://www.opengis.net/ogc" xmlns:sld="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" 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">
<sld:NamedLayer>
<!-- layer "3" is the "lateral services" line layer in the WMS service -->
<sld:Name>3</sld:Name>
<sld:UserStyle>
<!-- style should be applied on layer "3", reference the style by it's name "lineSymbolizer" -->
<sld:Name>lineSymbolizer</sld:Name>
<sld:Title>lineSymbolizer</sld:Title>
<sld:FeatureTypeStyle>
<sld:Rule>
<!-- use a "lineSymbolizer" to render river feature with #0000FF color and width 2 -->
<ogc:Filter>
<!-- uses a "PropertyIsEqualTo" filter to only render capital city of each state -->
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>INPROPMAT</ogc:PropertyName>
<ogc:Literal>Lead</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<sld:LineSymbolizer>
<sld:Stroke>
<sld:CssParameter name="stroke">#FF0000</sld:CssParameter>
<sld:CssParameter name="stroke-opacity">1</sld:CssParameter>
<sld:CssParameter name="stroke-width">5</sld:CssParameter>
</sld:Stroke>
</sld:LineSymbolizer>
</sld:Rule>
</sld:FeatureTypeStyle>
</sld:UserStyle>
</sld:NamedLayer>
</sld:StyledLayerDescriptor>
Thanks
bobb
Work like you don’t need money, love like you’ve never been hurt, and dance like no one’s watching
—Unknown Author
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20170222/541a9a28/attachment.htm>
More information about the MapServer-users
mailing list