[Qgis-user] Multiple lines label in QGIS 2.0 print composer using wrap on character?
Carlos López PSIG
carlos.lopez at psig.es
Tue Oct 22 14:52:00 PDT 2013
Hello Alexandre and everyone,
You can use "Expresion based label" in label properties...
For instance:
CASE
WHEN "CRLFPOS1" = 0 THEN "TEXT_TOP"
WHEN "CRLFPOS1" > 0 AND "CRLFPOS2" = 0
THEN
substr("TEXT_TOP",1,"CRLFPOS1"-1)||'\n'||substr("TEXT_TOP","CRLFPOS1"+1,length("TEXT_TOP")-"CRLFPOS1"+1)
WHEN "CRLFPOS1" > 0 AND "CRLFPOS2" > 0
THEN
substr("TEXT_TOP",1,"CRLFPOS1"-1)||'\n'||substr("TEXT_TOP","CRLFPOS1"+1,"CRLFPOS2"-"CRLFPOS1")||'\n'||substr("TEXT_TOP","CRLFPOS2"+1,length("TEXT_TOP")-"CRLFPOS2"+1)
END
Where "CRLFPOS1" is a numeric field with the position the first breakline
And "CRLFPOS2" is a numeric field with the position the second breakline
"TEXT_TOP" is a string field that contain annotations.
I hope that my mail help you ...
Regards,
*
*
*
*
*
*
*Carlos López Quintanilla*
www.psig.es
carlos.lopez at psig.es
+34 699.680.261
2013/10/22 Lene Fischer <lfi at life.ku.dk>
> Hi
> The trick is:
> expression/field || '\n' || expression/field
>
> || is the seperator between fields.
>
> Regards
> Lene Fischer
> ------------------------------
> *Fra:* qgis-user-bounces at lists.osgeo.org [
> qgis-user-bounces at lists.osgeo.org] på vegne af Alexandre Neto [
> senhor.neto at gmail.com]
> *Sendt:* 22. oktober 2013 11:09
> *Til:* QGIS User
> *Emne:* [Qgis-user] Multiple lines label in QGIS 2.0 print composer using
> wrap on character?
>
> Hello all,
>
> Is there a way to create multiple lines label using a wrap on character
> in QGIS 2.0 print composer? Or this must be done with html rendering?
>
> I'm using atlas generation and the label source is attribute from my
> coverage layer.
>
> Thanks,
>
> Alexandre Neto
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20131022/220e2980/attachment.html>
More information about the Qgis-user
mailing list