Geographic Information Systems Asked by user2722043 on December 20, 2020
I’m trying to use an expression to label a layer by using multiple fields, and assign different colors using QGIS 2.16.
In ArcGIS I am able to achieve this using the following expression:
def FindLabel([DesceasedName], [ownerName], [all_spaceid]):
if [DesceasedName] = "":
return "<BOL><FNT size = '5'>" + [DesceasedName] + "</FNT></BOL>"+ 'n' + "<CLR red='115' green='38' blue='0'><BOL>" + [all_spaceid] + "</BOL></CLR>"
elif [DesceasedName] == "":
return "<CLR blue='255'><FNT size = '5'>" + [ownerName] + "</FNT></CLR>" + 'n' + "<CLR red='115' green='38' blue='0'><BOL>" + [all_spaceid] + "</BOL></CLR>"
else:
return ""
How to achieve the same labeling in QGIS?
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP