Hello all,

Ok, I have been looking at this for a while, and I think I have it nailed down pretty well.
There has been some issues with using QGIS SLD's in Geoserver.
The following should enable you to utilise the styling power of QGIS and make it compatible with Geoserver

In the main, this process only works for geometry, and will not work for styling text it may require some additional tweaking here and there also.

Firstly, style your layer the way you want.

Next save your style as a SLD.

Open the SLD in Notepad++ or other text editor

Create a new blank text document and use the following as a template:

*/<?xml version="1.0" encoding="ISO-8859-1"?>/*

*/<StyledLayerDescriptor version="1.0.0" /*

*/xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd" /*

*/xmlns="http://www.opengis.net/sld"; /*

*/xmlns:ogc="http://www.opengis.net/ogc"; /*

*/xmlns:xlink="http://www.w3.org/1999/xlink"; /*







*/<!-- Start -->/*

*/<!-- COPY AND PASTE QGIS SLD CODE BETWEEN <FeatureTypeStyle> and </FeatureTypeStyle> IN HERE-->/*

*/<!-- End --> /*





Copy the code between but excluding <FeatureTypeStyle> and </FeatureTypeStyle> and paste it into the new document overwriting */<!-- COPY AND PASTE QGIS SLD CODE BETWEEN <FeatureTypeStyle> and </FeatureTypeStyle> IN HERE--> /*

Find and replace the following:

·*/se:/* with nothing (effectively deleting it) so for example where you have <se:Rule> it becomes <Rule>

·*/<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc";> /*with */<ogc:Filter>/*

·Delete all instances of */<Description>…..</Description>/* inclusive of everything in between (usually a Title)

·*SvgParameter *with *CssParameter


One other thing where you utilise Map units (meters, feet or pixel) in your styling you will have to use the following examples shown in the link below


I would ask the question, would it be possible to create a simple Geoserver Style using what I have found above?? adding an option to save the QGIS style using the above rules?

If anyone has any questions or needs any clarification let me know, If I can help I will.


Richard McDonnell

OPW - Ag féachaint don am atá le teacht - Ag caomhnú ón am atá thart
OPW - Looking to the future - Caring for the past

Email Disclaimer: http://www.opw.ie/en/disclaimer/

<<attachment: richard_mcdonnell.vcf>>

Qgis-user mailing list
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to