[Qgis-user] Textual representation of styles ?

Andrea Aime andrea.aime at geo-solutions.it
Wed Aug 8 01:22:55 PDT 2018


This approach is "old news", if you're using newer versions of QGIS (3+)
and GeoServer (hum... 2.13 works, not sure from when, probably 2.11)
then trying to switch it from SLD 1.1 down to SLD 1.0 should be
unnecessary, GeoServer should read the exported styling directly.

There are still however various limitations, GeoSolutions launched a
crowdfunding initiative some time ago that so far only gathered funds for
label exports (available in QGIS 3.0), but failed to get funds for the rest:
https://www.geo-solutions.it/news/crowdfunding-qgis-geoserver-styling-interoperability/

Cheers
Andrea

On Wed, Aug 8, 2018 at 10:14 AM Richard McDonnell <richard.mcdonnell at opw.ie>
wrote:

> Hi,
>
> You can implement it in Geoserver, it just takes a little editing.
>
> Generally what works for me is using something like Notepad++ to:-
>
>
>
> 1.      Remove all Instances of *<se:Description>…</se:Description>*
>
> 2.      Change all Instances * <ogc:Filter
> xmlns:ogc="http://www.opengis.net/ogc <http://www.opengis.net/ogc>"> *to
> *<ogc:Filter>*
>
> 3.      Removing all instances of *se:*
>
> 4.      Change all instances of *SvgParameter* to *CssParameter*
>
>
>
> This usually sorts any issues out, you will of course need to validate it
> in GeoServer.
>
> Hope this helps!
>
> Regards,
>
>
>
> Richard.
>
>
>
>
>
> --
>
> [image: OPW logo]
>
> *Richard McDonnell*
> *GIS Specialist* | FRM Data Management
> ------------------------------
>
> [image: email]
>
> Email:  richard.mcdonnell at opw.ie
>
>
>
> [image: office]
>
> Phone:  + 353 (0) 1 647 6543
>
>
>
> [image: mobile]
>
> Mobile:  +353 (0) 87 688 5964
>
> *The Office of Public Works*
>
> 52 St. Stephen's Green
>
> Dublin 2 ~ D02 DR67
>
>
>
> [image: Facebook] <https://facebook.com/opwireland>
>
> [image: Twitter] <https://twitter.com/opwireland>
>
> [image: YouTube] <https://youtube.com/c/OpwIe>
>
>
>
>
>
> *From:* Ville Koivisto [mailto:ville.koivisto at kuntotekniikka.fi]
> *Sent:* 08 August 2018 06:28
> *To:* Richard McDonnell <richard.mcdonnell at opw.ie>; 'Lars I. Nielsen,
> LIFA A/S' <lin at LIFA.DK>; qgis-user at lists.osgeo.org
> *Subject:* RE: [Qgis-user] Textual representation of styles ?
>
>
>
> *Good morning,*
>
>
>
> Wait, so I can’t straight away use an SLD file generated in QGIS for
> styling my layers in Geoserver? Is there any more info about his somewhere?
>
>
>
> *Thanking you in advance,*
>
>
>
> Ville Koivisto
>
> +35840 701 4283
>
> GIS Expert
>
> Suomen kuntotekniikka Oy
>
>
>
>
>
> *From:* Qgis-user <qgis-user-bounces at lists.osgeo.org> *On Behalf Of *Richard
> McDonnell
> *Sent:* Tuesday, August 7, 2018 5:24 PM
> *To:* Lars I. Nielsen, LIFA A/S <lin at LIFA.DK>; 'qgis-user at lists.osgeo.org'
> <qgis-user at lists.osgeo.org>
> *Subject:* Re: [Qgis-user] Textual representation of styles ?
>
>
>
> Hi Lars,
>
> Would SLD be what you ar looking for?
>
>
>
> http://www.opengeospatial.org/standards/sld
>
>
>
> QGIS can save its styles to this format, be aware, its not a full
> implementation of SLD, so it takes a little tweaking to make it work with
> other SLD compliant software line GeoServer.
>
> Hope it helps,
>
>
>
> Richard.
>
>
>
>
>
>
>
> *From:* Qgis-user [mailto:qgis-user-bounces at lists.osgeo.org
> <qgis-user-bounces at lists.osgeo.org>] *On Behalf Of *Lars I. Nielsen, LIFA
> A/S
> *Sent:* 07 August 2018 14:50
> *To:* 'qgis-user at lists.osgeo.org' <qgis-user at lists.osgeo.org>
> *Subject:* [Qgis-user] Textual representation of styles ?
>
>
>
> Hi list.
>
>
>
> Does QGIS utilize and support textual styles, e.g. as read from data ?
>
>
>
> OGR has a feature style specification (
> https://www.gdal.org/ogr_feature_style.html ), with some examples shown
> below.
>
>
>
> Has anyone used QGIS to facilitate such style representation ?
>
>
>
> --
>
>
>
> *Here are some example style definition strings: *
>
>    -
> *A 5 pixels wide red line: **PEN(c:#FF0000,w:5px)*
>    -
> *A polygon filled in blue, with a black outline: *
>    *BRUSH(fc:#0000FF);PEN(c:#000000)*
>    -
> *A point symbol: **SYMBOL(c:#00FF00,id:"points.sym-45,ogr-sym-7")*
>    -
> *A text label, taking the text string from the "text_attribute" attribute
>    field: **LABEL(f:"Times New Roman",s:12pt,t:{text_attribute})"*
>
> *Here is what a style table that contains all the above styles could look
> like: *
>
> *    road:      PEN(c:#FF0000,w:5px)*
>
> *    lake:      BRUSH(fc:#0000FF);PEN(c:#000000)*
>
> *    campsite:  SYMBOL(c:#00FF00,id:"points.sym-45,ogr-sym-7")*
>
> *    label:     LABEL(f:"Times New Roman",s:12pt,t:{text_attribute})*
>
>
>
> --
>
>
>
> I know that QGIS supports its own XML style format, and supports some form
> of SLD. Both are layer based, though, not feature based.
>
>
> Med venlig hilsen
>
> Lars I. Nielsen, LIFA A/S
> GIS konsulent, FME Certified Professional
>
> [image: Beskrivelse: http://website.lifa.dk/docs/LIFA_GIS·IT_logo.png]
>
> *T*
>
> 6313 6800
>
> *@*
>
> lin at lifa.dk
>
> *D*
>
> 6313 6849
>
> *W*
>
> www.lifa.dk
>
> *M*
>
> 2492 4866
>
>
>
>
>
>
> *Vi tilbyder interne og eksterne kurser. Du kan finde mere information i
> vores *
>
> *kursuskalender <https://www.lifa.dk/kursuskalender> **[image:
> Beskrivelse:
> C:\Users\lin\AppData\Roaming\Microsoft\signatures\21x21-Images-Get-L749-l8.png]*
> <https://www.linkedin.com/company/lifa-a-s/>
> Følg os på LinkedIn og læs de seneste nyheder fra LIFA A/S Landinspektører
>
> [image: Image removed by sender.] <http://www.opw.ie/>
>
>
>
> Email Disclaimer: http://www.opw.ie/en/disclaimer/
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user



-- 

Regards, Andrea Aime == GeoServer Professional Services from the experts!
Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime
@geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054
Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339
8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it
------------------------------------------------------- *Con riferimento
alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 -
Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni
circostanza inerente alla presente email (il suo contenuto, gli eventuali
allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i
destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per
errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le
sarei comunque grato se potesse darmene notizia. This email is intended
only for the person or entity to which it is addressed and may contain
information that is privileged, confidential or otherwise protected from
disclosure. We remind that - as provided by European Regulation 2016/679
“GDPR” - copying, dissemination or use of this e-mail or the information
herein by anyone other than the intended recipient is prohibited. If you
have received this email by mistake, please notify us immediately by
telephone or e-mail.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20180808/03811a1f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image017.png
Type: image/png
Size: 8192 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20180808/03811a1f/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image018.png
Type: image/png
Size: 1204 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20180808/03811a1f/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 1816 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20180808/03811a1f/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 642 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20180808/03811a1f/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.png
Type: image/png
Size: 576 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20180808/03811a1f/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.png
Type: image/png
Size: 523 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20180808/03811a1f/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image007.png
Type: image/png
Size: 725 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20180808/03811a1f/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image008.png
Type: image/png
Size: 1144 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20180808/03811a1f/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image009.png
Type: image/png
Size: 914 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20180808/03811a1f/attachment-0008.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image010.jpg
Type: image/jpeg
Size: 2060 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20180808/03811a1f/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image007.png
Type: image/png
Size: 725 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20180808/03811a1f/attachment-0009.png>


More information about the Qgis-user mailing list