[Qgis-user] label layer with attributes in different styles

Richard McDonnell richard.mcdonnell at opw.ie
Thu Aug 27 08:47:11 PDT 2020


Michael,
You are very welcome, I hope it goes some way to giving you a solution.
Regards,

RIchard


--
Richard McDonnell MSc GIS, FME Certified Professional
FRM Data Management

--
Oifig na nOibreacha Poiblí
Office of Public Works

Sráid Jonathan Swift, Baile Átha Troim, Co na Mí, C15 NX36
Jonathan Swift Street, Trim, Co Meath, C15 NX36
--
M +353 87 688 5964 T +353 1 647 6543
https://www.opw.ie

--
To send me files larger than 30MB, please use the link below https://filetransfer.opw.ie/filedrop/richard.mcdonnell@opw.ie

Email Disclaimer: https://www.opw.ie/en/disclaimer/
From: Grün, Michael <gruenm at uni-trier.de>
Sent: 27 August 2020 16:25
To: Richard McDonnell <richard.mcdonnell at opw.ie>
Subject: AW: [Qgis-user] label layer with attributes in different styles

Hi Richard,
thanx a lot for your quick answer!
Seems to be a very good solution when positioning 1 label left and 1 label right of the point...see attached png.
My symbols will have different sizes, so I'll have to set some values in the override....but I'll give it a try!
Best regards from Trier/Germany
Michael
Von: Richard McDonnell <richard.mcdonnell at opw.ie<mailto:richard.mcdonnell at opw.ie>>
Gesendet: Donnerstag, 27. August 2020 16:12
An: Grün, Michael <gruenm at uni-trier.de<mailto:gruenm at uni-trier.de>>; qgis-user at lists.osgeo.org<mailto:qgis-user at lists.osgeo.org>
Betreff: RE: [Qgis-user] label layer with attributes in different styles

Hi I have one possible solution, or work around...

1.       Use your Layer to display the first part Name

2.       Duplicate the layer and set it to not display symbols (Properties - Symbology - No Symbols)

3.       Label the duplicate with the "Second Half" of your Label, the Brackets and Number.

4.       Now under placement you can position the "Second half" of your Label to line up with the first.
I have not tried it, but it's the only solution I can come up with at the moment.
Regards,

Richard.




--
Richard McDonnell MSc GIS, FME Certified Professional
FRM Data Management

--
Oifig na nOibreacha Poiblí
Office of Public Works

Sráid Jonathan Swift, Baile Átha Troim, Co na Mí, C15 NX36
Jonathan Swift Street, Trim, Co Meath, C15 NX36
--
M +353 87 688 5964 T +353 1 647 6543
https://www.opw.ie

--
To send me files larger than 30MB, please use the link below https://filetransfer.opw.ie/filedrop/richard.mcdonnell@opw.ie

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

From: Qgis-user <qgis-user-bounces at lists.osgeo.org<mailto:qgis-user-bounces at lists.osgeo.org>> On Behalf Of Grün, Michael
Sent: 27 August 2020 14:28
To: qgis-user at lists.osgeo.org<mailto:qgis-user at lists.osgeo.org>
Subject: [Qgis-user] label layer with attributes in different styles

Hi all,
Very simple example:
I have a point layer and I want to label it with 2 attributes (name, number) and differ them within their styles.
Cologne (10)
Hamburg (14)
name || ' ' || '(' ||  "number"  || ')'

Now I just want for more difference the number (and brackets) in another colour (or style, bold e.g.).
Cologne (10)
Hamburg (14)

I tried it with the button "data devided override" - but changes always for both attributes, no difference within.
I tried rule-based labeling - without result.
Allow HTML formatting <b>number</b>, but how?
Actually I thought this would be very simple...any hints?
Thanx a lot...kindly regards, Michael

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20200827/b09713ad/attachment.html>


More information about the Qgis-user mailing list