[Qgis-user] Textual representation of styles ?
Andreas Neumann
a.neumann at carto.net
Tue Aug 7 07:12:31 PDT 2018
Hi Lars,
QGIS supports "data defined" properties. Any graphical attribute is
usually also exposed as "data-defined".
Wherever you can defined this data-defined icon (see
https://docs.qgis.org/2.18/en/_images/mIconDataDefine.png) you can
either specify a feature attribute or rule or calculation to define a
property.
See also
https://docs.qgis.org/2.18/en/docs/user_manual/introduction/general_tools.html#data-defined
So - if your data contains attributes that can be used for symbology,
you can apply such data-defined overrides.
OGR feature styles are not directly supported by QGIS, but if they are
exposed in one or more attributes, you may use this information for
data-defined overrides.
Hope this helps,
Andreas
Am 07.08.2018 um 15:49 schrieb Lars I. Nielsen, LIFA A/S:
>
> 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
>
> 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 <http://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>
>
> **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
>
>
>
> _______________________________________________
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20180807/f44d4ed8/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 8192 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20180807/f44d4ed8/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 1204 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20180807/f44d4ed8/attachment-0001.png>
More information about the Qgis-user
mailing list