SLD Support and other QGIS 1.8 Style Features

The upcoming 1.8 release contains many new features for handling layer styles.

Copy-paste Styles

Very handy new entries in the layer list context menu: “Copy Style” and “Paste Style” make copying layer styles really fast. You don’t even have to open layer properties anymore.

SLD Support

Besides the classic QML layer style files, QGIS 1.8 supports the SLD standard. SLDs can be exported from and imported into new symbology.

One thing worth to note: SLDs can be exported from any type of renderer: single symbol, categorized, graduated or rule-based, but when importing an SLD, either a single symbol or rule-based renderer is created.

That means that categorized or graduated styles are converted to rule-based. If you want to preserve those renderers, you have to stick to the QML format. On the other hand, it could be very handy sometimes to have this easy way of converting styles to rule-based.

Symbol Levels

If you are looking for the “Symbol level” settings, they have been moved to the “Advanced” button:

Rule-based Renderer

The rule-based renderer GUI got a major face-lift. Just compare the 1.7 version

Rule-based renderer GUI in 1.7

to the new clean 1.8 version:

Rule-based renderer in 1.8

Grouping of styles has been overhauled too: Using drag-and-drop, layers can be arranged into groups in a more flexible manner than previously possible.

There is also a new context menu which enables workflows such as changing the transparency of multiple symbols at once:

Symbol levels for the rule-based renderer can now be accessed via “Rendering order”.

It’s obvious that a lot of work has been put into style handling since the 1.7 release and these improvements are just a small fraction of what’s been done to get closer to the big goal: releasing 2.0.

12 comments
  1. Kurt said:

    Is there already a termin, when the finished version 1.8 will be available??

  2. Kurt said:

    thank you very much for this info!

  3. pvanb said:

    Hi, do you know if exporting and loading a sld file for point or line fill patterns? If I save a style file in sld format, all point (or line) fill pattern are converted to simple fill (with grey fill) when loading again in QGIS

    • I doubt SLD contains the concept of point or line fills. I think SLD is more limited than QGIS styles.

      • pvanb said:

        OK, thanks.. I would have liked to use SLD as the way it is build up seems easier to use / create in a script

  4. KyJavaGeek said:

    If I have an SLD file from a different tool can I expect it will work with QGIS? That would be tremendous. I spent a great deal of time refining a map in another tool just to have to abandon the tool. But the map looked great.looked great.

    • In QGIS, the SLD is translated into a rule-based style. As far as I know, all rules that are supported in SLD are also possible in QGIS but I haven’t tested this assumption with complex SLDs.

  5. Ian said:

    The SLD save option only appears to be available for vector layers. Is a raster version in the pipeline?

    • I don’t know. Best ask on the mailing list and/or file a feature request.

  6. geogovert said:

    Is it also possible to export the labeling with the sld file?

    • As far as I know, label settings are currently not exported.