[Qgis-user] Re : Multy field labels
Junior
delazj at gmail.com
Fri May 15 08:51:47 PDT 2015
I think CONCAT ("NAME_GEO", "ELEV") should have worked as expected, without needing to use Case expression.
Whatever, good to see that u solved your problem
Envoyé depuis mon HTC
----- Reply message -----
De : "Irakli Ugulava" <i.ugulava at gmail.com>
Pour : "Andreas Neumann" <a.neumann at carto.net>
Cc : <qgis-user at lists.osgeo.org>
Objet : [Qgis-user] Multy field labels
Date : ven., mai 15, 2015 17:17
Thanks a lot,
I combine both advises, and get at last this
CASE WHEN "NAME_GEO" IS NOT NULL THEN CONCAT ("NAME_GEO", "ELEV") ELSE "ELEV" END
it works at last
Thanks a lot :)
On Fri, May 15, 2015 at 6:29 PM, Andreas Neumann <a.neumann at carto.net> wrote:
Hi,
You need to use COALESCE(labelfield,'alternate text')
If the label contains data, the data is used, if it contains NULL,
the alternate text is displayed, which often is an empty string, a
replacement text or another field.
In your case, you could use:
COALESCE("NAME_GEO" || '(' || elev || ')','elev')
In case it has a name, the name is displayed with elevation, if it
is null, then the elevation is displayed.
This is the same syntax like SQL is using.
Hope this helps,
Andreas
On 15.05.2015 16:01, Irakli Ugulava
wrote:
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
_______________________________________________
Qgis-user mailing list
Qgis-user at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user
_______________________________________________
Qgis-user mailing list
Qgis-user at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user
--
Irakli UgulavaSenior 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/20150515/766c204c/attachment.html>
More information about the Qgis-user
mailing list