In QGIS there are 2 options to style labels.

  1. Using the style properties.
  2. Using the label in the toolbox

When I dbl click layer -> styles -> save as SLD , the style of the label isn't saved in case I use the 2nd option.

Is there an option to save it so I can import it to GeoServer ?

  • 1
    More stuff seems to not being saved in sld file... For exemple transparency. Aug 23 '13 at 17:13

There is an open feature request for this functionality: http://hub.qgis.org/issues/8925

If you have the skills or means to help implement it, please contact the developer team.

  • Sadly ... My background is in .Net , Not much I can help here with QGIS (although slowly I'm moving towards open source , now working on Postgres from MSSQL)
    – Alophind
    Jan 25 '14 at 16:24

Instead of QGIS you can use "uDig" to create valid SLDs. You can copy/paste the sld-code directly from uDig into GeoServer. And it supports more attributes than SLDs created with QGIS, like transparency and labeling.

For your purpose the SLD created by QGIS is not even valid for GeoServer. Geoserver doesnt accept the attribute "units" in the 2nd line. Though if you remove it GeoServer accepts the SLD.

  • Not even valid for geoserver reads as if the problem is with qgis. The problem is with geoserver not supporting the SLD specification.
    – nmtoken
    Dec 2 '16 at 22:08
  • yes, you're right. the problem is not with the SLD created by QGIS. Geoserver doesnt support some attributes that are included in the SLD QGIS creates.
    – TSrocky
    Dec 6 '16 at 9:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.