WMS Styled Layer Descriptor (SLD) samples

The following SLD samples are available on the public server sampleserver1.arcgisonline.com. Their purpose is to help you understand how WMS services from ArcGIS Server work with external SLD resources.

Each sample has a corresponding SLD XML file accessible through the URL http://sampleserver1.arcgisonline.com/arcgis/wms/slds/<file_name>.xml to mimic an external SLD xml resource from a client. Each sample also has a WMS GetMap request, which requests a public ArcGIS Server WMS service (also on sampleserver1.arcgisonline.com) to render the map using a style defined in the external SLD resource.

All SLD samples below are designed and created for a public ArcGIS Server WMS service called ESRI_StatesCitiesRivers_USA, which can be accessed through the URL http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer? To use the samples, you can either click the GetMap request link or copy the request string and open it in a browser.

To view the content of a sample SLD file, just directly access the XML through the provided URL. Alternatively, you are free to download any of the sample SLD XML files below, modify them, and expose them back again through a public URL so that you can request the ESRI_StatesCitiesRivers_USA WMS service to render the map using your own SLD style.

point_pointSymbolizer

point_propertyIsEqualTo

point_propertyIsNotEqualTo

point_propertyIsLike

point_not

point_bbox

point_within

polyline_lineSymbolizer

polygon_polygonSymbolizer

polygon_textSymbolizer

polygon_propertyIsEqualTo

polygon_propertyIsGreaterThan

polygon_propertyIsGreaterThanOrEqualTo

polygon_propertyIsLessThan

polygon_propertyIsLessThanOrEqualTo

polygon_multiple_rules

polygon_and

polygon_or

polygon_contains

polygon_crosses

polygon_disjoint

polygon_intersects

polygon_overlaps

point_pointSymbolizer

Description: An SLD style that uses a "pointSymbolizer" to render features in a point layer

URL of SLD file: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/point_pointSymbolizer.xml

GetMap request: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,1,2&STYLES=,,pointSymbolizer&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/point_pointSymbolizer.xml

GetMap response:

point_propertyIsEqualTo

Description: An SLD style that uses a "propertyIsEqualTo" filter to render only a subset of all features in a point layer

URL of SLD file: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/point_propertyIsEqualTo.xml

GetMap request: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,1,2&STYLES=,,propertyIsEqualTo&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/point_propertyIsEqualTo.xml

GetMap response:

point_propertyIsNotEqualTo

Description: An SLD style that uses a "propertyIsNotEqualTo" filter to render only a subset of all features in a point layer

URL of SLD file: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/point_propertyIsNotEqualTo.xml

GetMap request: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,1,2&STYLES=,,propertyIsNotEqualTo&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/point_propertyIsNotEqualTo.xml

GetMap response:

point_propertyIsLike

Description: An SLD style that uses a "propertyIsLike" filter to render only a subset of all features in a point layer. For example: Only render cities whose name starts with "San" or "Santa".

URL of SLD file: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/point_propertyIsLike.xml

GetMap request: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,1,2&STYLES=,,propertyIsLike&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/point_propertyIsLike.xml

GetMap response:

point_not

Description: An SLD style that uses a "not" logic filter to negate another filter and render only a subset of all features in a point layer

URL of SLD file: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/point_not.xml

GetMap request: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,1,2&STYLES=,,not&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/point_not.xml

GetMap response:

point_bbox

Description: An SLD style that uses a "bbox" spatial filter to render only features within a bounding box.

URL of SLD file: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/point_bbox.xml

GetMap request: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,1,2&STYLES=,,bbox&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/point_bbox.xml

GetMap response:

point_within

Description: An SLD style that uses a "within" spatial filter to render only features within a polygon geometry

URL of SLD file: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/point_within.xml

GetMap request: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,1,2&STYLES=,,within&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/point_within.xml

GetMap response:

polyline_lineSymbolizer

Description: An SLD style that uses a "lineSymbolizer" to render features in a polyline layer

URL of SLD file: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polyline_lineSymbolizer.xml

GetMap request: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,1&STYLES=,lineSymbolizer&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polyline_lineSymbolizer.xml

GetMap response:

polygon_polygonSymbolizer

Description: An SLD style that uses a "polygonSymbolizer" to render features in a polygon layer

URL of SLD file: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_polygonSymbolizer.xml

GetMap request: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0&STYLES=polygonSymbolizer&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_polygonSymbolizer.xml

GetMap response:

polygon_textSymbolizer

Description: An SLD style that uses a "textSymbolizer" to add text to each feature in a polygon layer

URL of SLD file: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_textSymbolizer.xml

GetMap request: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0&STYLES=textSymbolizer&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_textSymbolizer.xml

GetMap response:

polygon_propertyIsEqualTo

Description: An SLD style that uses a "propertyIsEqualTo" filter to render only a subset of all features in a polygon layer

URL of SLD file: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_propertyIsEqualTo.xml

GetMap request: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,0&STYLES=,propertyIsEqualTo&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_propertyIsEqualTo.xml

GetMap response:

polygon_propertyIsGreaterThan

Description: An SLD style that uses a "propertyIsGreaterThan" filter to render only a subset of all features in a polygon layer

URL of SLD file: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_propertyIsGreaterThan.xml

GetMap request: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,0&STYLES=,propertyIsGreaterThan&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_propertyIsGreaterThan.xml

GetMap response:

polygon_propertyIsGreaterThanOrEqualTo

Description: An SLD style that uses a "propertyIsGreaterThanOrEqualTo" filter to render only a subset of all features in a polygon layer

URL of SLD file: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_propertyIsGreaterThanOrEqualTo.xml

GetMap request: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,0&STYLES=,propertyIsGreaterThanOrEqualTo&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_propertyIsGreaterThanOrEqualTo.xml

GetMap response:

polygon_propertyIsLessThan

Description: An SLD style that uses a "propertyIsLessThan" filter to render only a subset of all features in a polygon layer

URL of SLD file: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_propertyIsLessThan.xml

GetMap request: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,0&STYLES=,propertyIsLessThan&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_propertyIsLessThan.xml

GetMap response:

polygon_propertyIsLessThanOrEqualTo

Description: An SLD style that uses a "propertyIsLessThanOrEqualTo" filter to render only a subset of all features in a polygon layer

URL of SLD file: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_propertyIsLessThanOrEqualTo.xml

GetMap request: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,0&STYLES=,propertyIsLessThanOrEqualTo&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_propertyIsLessThanOrEqualTo.xml

GetMap response:

polygon_multiple_rules

Description: An SLD style that uses multiple rules to apply distinct symbology on subsets of features in a polygon layer

URL of SLD file: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_multiple_rules.xml

GetMap request: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0&STYLES=multiple_rules&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_multiple_rules.xml

GetMap response:

polygon_and

Description: An SLD style that uses an "and" logic filter to combine two other filters to render a subset of features in a polygon layer

URL of SLD file: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_and.xml

GetMap request: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,0,1&STYLES=,and,&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_and.xml

GetMap response:

polygon_or

Description: An SLD style that uses an "or" logic filter to combine with another filter to render a subset of features in a polygon layer

URL of SLD file: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_or.xml

GetMap request: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,0,1&STYLES=,or,&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_or.xml

GetMap response:

polygon_contains

Description: An SLD style that uses a "contains" spatial filter to render only polygon features that contain a specific point

URL of SLD file: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_contains.xml

GetMap request: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,0,1,2&STYLES=,contains,,sf&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_contains.xml

GetMap response:

polygon_crosses

Description: An SLD style that uses a "crosses" spatial filter to render only polygon features that cross another feature

URL of SLD file: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_crosses.xml

GetMap request: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,0,1&STYLES=,crosses,northPlatte&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_crosses.xml

GetMap response:

polygon_disjoint

Description: An SLD style that uses a "disjoint" spatial filter to render only polygon features that disjoint another feature

URL of SLD file: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_disjoint.xml

GetMap request: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,0,1&STYLES=,disjoint,northPlatte&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_disjoint.xml

GetMap response:

polygon_intersects

Description: An SLD style that uses an "intersects" spatial filter to render only polygon features that intersect another feature

URL of SLD file: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_intersects.xml

GetMap request: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,0,1&STYLES=,intersects,redRiver&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_intersects.xml

GetMap response:

polygon_overlaps

Description: An SLD style that uses an "overlaps" spatial filter to render only polygon features that overlap another feature

URL of SLD file: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_overlaps.xml

GetMap request: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,0&STYLES=,overlaps&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_overlaps.xml

GetMap response:


3/6/2013