bg_image
header

Styled Layer Descriptor - SLD

SLD (Styled Layer Descriptor) is an XML-based standard developed by the Open Geospatial Consortium (OGC). It is used to define the styling of geospatial data in web mapping services like WMS (Web Map Service).

What does SLD do?

SLD describes how certain geospatial features should be rendered on a map — meaning it defines colors, lines, symbols, labels, and more. With SLD, you can specify things like:

  • Roads should appear red.

  • Water bodies in blue, with a certain transparency.

  • Points should have symbols that vary depending on attribute values (e.g., population).

  • Text labels over features.

Technically:

  • SLD is an XML file with a defined structure.

  • It can be read by WMS servers like GeoServer or MapServer.

  • The file includes Rules, Filters, and Symbolizers like LineSymbolizer, PolygonSymbolizer, or TextSymbolizer.

Example of a simple SLD snippet:

<Rule>
  <Name>Water Bodies</Name>
  <PolygonSymbolizer>
    <Fill>
      <CssParameter name="fill">#0000FF</CssParameter>
    </Fill>
  </PolygonSymbolizer>
</Rule>

Why is it useful?

  • To create custom-styled maps (e.g., thematic maps).

  • To define styling server-side, so the map is rendered correctly regardless of the client.

  • For interactive web GIS applications that react to attribute values.

If you're working with geospatial data — for example in QGIS or GeoServer — you'll likely come across SLD when you need fine-grained control over how your maps look.