[Qgis-user] Fwd: Multy field labels
Piotr Kania
p.kania at op.pl
Sat May 16 23:35:35 PDT 2015
I have polygon layer in spatialite base, I need to have a label
combined from few fields, I use:
coalesce("SITE_TYPE_CD") || coalesce("MOISTURY_CD") ||
coalesce("STAN_SIEDLISKA_KOD") || coalesce("TD") || '\n' ||
coalesce("SOIL_SUBTYPE_CD") || coalesce("GLEBA_ODM1") || '-' ||
coalesce("STOP_WODY") || '-' || coalesce("SOIL_SPECIES_1_CD") ||
coalesce("SOIL_LEVEL_1_CD") || coalesce("SOIL_SPECIES_2_CD") ||
coalesce("SOIL_LEVEL_2_CD") || coalesce("SOIL_SPECIES_3_CD")
When there is no "coalesce" function, the label doesn't show (most of
the fields has NULL value, as I edit that layer all the time -> labels
show me which features were "filled" with true values).
I found the solution (about "coalesce" function) here:
http://gis.stackexchange.com/questions/122199/how-to-display-multiple-fields-as-labels-if-one-field-is-null
--- Treść przekazanej wiadomości ---
Temat: [Qgis-user] Multy field labels
Data: Fri, 15 May 2015 18:01:16 +0400
Nadawca: Irakli Ugulava <i.ugulava at gmail.com>
Adresat: qgis-user at lists.osgeo.org
For physical map need to label summits and elevation points, some of
them have name some no, so I need to label them from different fields.
when I use expression :
"NAME_GEO" Â || Â "elev"
It works, but summits with no names, (field "NAME_GEO" is empty), has no
label at all, according to ArcGis logic they should have only elevation
on labels.
I try following expression Â
CASE WHEN "name_geo" is null  THEN "NAME_GEO"  ||  "ELEV"  ELSE "elev"
but it return no labels at all.
Thanks All
--
Irakli Ugulava
Senior GIS Expert, CofounderÂ
GeoLand Ltd.
3Â Telegraph Cule-de-sac
Tbilisi 0105, Georgia,Â
Tel: Â +995 32 922553
Mob +995 99 172016
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20150517/a9b6b48f/attachment.html>
-------------- next part --------------
_______________________________________________
Qgis-user mailing list
Qgis-user at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user
More information about the Qgis-user
mailing list