I have layers on my QGIS project.

  • Rivers
  • Water pipes
  • Gas pipes
  • .....

I set the color, width, size of these layers. All layers are different style.

I want to use these styles in geoserver. I have WMS for each layer. So I should save single SLD files in QGIS and upload them in geoserver.

I want to save all layer styles in a single SLD file from QGIS and create a single style in geoserver. Than Apply it to WMS layer.

Is this possible?

  • surely all those layers will be separate on GeoServer too?
    – Ian Turton
    Jun 19, 2014 at 9:37

1 Answer 1


The short answer is 'yes'.

SLD is just XML so you can easily use the editor in Geoserver or any text editor to splice the SLDs together. However, you will need to know how the SLD definition works so you can handle applying the same single style definition to all these layers perhaps by defining some rule that differentiates the data maybe based on some definable attribute. The exact 'how' for this will depend hugely on your specific data sets and their attributes etc. and without knowing that we can't give you an exact recipe.

If you don't fancy editing the SLD files themselves, there is possibly an alternative approach. you could merge all the files in QGIS, apply your styles and export what is effectively a 'precombined' SLD file and use that. Here the editing effort comes at the QGIS end of things and having to set up the style again, but you may be more familiar with QGIS than XML - just a thought!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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