[Qgis-user] Using QGIS to create Geoserver SLD

Luigi Pirelli luipir at gmail.com
Tue Jul 19 05:46:33 PDT 2016


Hi Richard

can you prepare a test case that have to be solved pusching somewhere? I
mean
a
1) base layer
2) a workflow to have it in geoserver and qgis (a qgs project)
3) the expected rendering in QGIS and/or Geoserver (images)
4) specify versions for geoserver and qgis
5) any additional data (e.g sld or qml) with workflow to replicate your
experience

in this way you can help to target punctual problems if a general solution
can't be found.

As Richard said, please feel free to join to the "hackaton" in Bonn,
remotely or live.

cheers

Luigi Pirelli

**************************************************************************************************
* Boundless QGIS Support/Development: lpirelli AT boundlessgeo DOT com
* LinkedIn: https://www.linkedin.com/in/luigipirelli
* Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
* GitHub: https://github.com/luipir
* Mastering QGIS:
https://www.packtpub.com/application-development/mastering-qgis
**************************************************************************************************

On 19 July 2016 at 13:48, Richard McDonnell <richard.mcdonnell at opw.ie>
wrote:

> 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"
> <http://www.opengis.net/sldStyledLayerDescriptor.xsd> *
>
> * xmlns="http://www.opengis.net/sld" <http://www.opengis.net/sld> *
>
> * xmlns:ogc="http://www.opengis.net/ogc" <http://www.opengis.net/ogc> *
>
> * xmlns:xlink="http://www.w3.org/1999/xlink"
> <http://www.w3.org/1999/xlink> *
>
> * xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> <http://www.w3.org/2001/XMLSchema-instance>>*
>
> *<NamedLayer>*
>
> *<Name>YourLayerName</Name>*
>
> *<UserStyle>*
>
> *<Title>YourLayerTitle</Title>*
>
> *<FeatureTypeStyle>    *
>
> *      <!-- Start -->*
>
> *<!-- COPY AND PASTE QGIS SLD CODE BETWEEN <FeatureTypeStyle> and
> </FeatureTypeStyle> IN HERE-->*
>
> *      <!-- End -->                 *
>
> *      </FeatureTypeStyle>*
>
> *    </UserStyle>*
>
> *  </NamedLayer>*
>
> *</StyledLayerDescriptor>*
>
> 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"
> <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
>
> http://docs.geoserver.org/latest/en/user/styling/sld-extensions/uom.html
>
> 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.
>
> Regards,
>
> 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
> <http://www.opw.ie/>
> Email Disclaimer: http://www.opw.ie/en/disclaimer/
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20160719/553cc075/attachment.html>


More information about the Qgis-user mailing list