[Qgis-user] Label missing in Weekly

Larry Shaffer larrys at dakotacarto.com
Thu Aug 1 14:35:45 PDT 2013


Hi Lene,

On Thu, Aug 1, 2013 at 2:25 PM, Lene Fischer <lfi at life.ku.dk> wrote:

> Hi Goyo
> The geometries is OK.
> I have a combined label Ex.
> Areatype || '\n' ||  $Area   || ' m2'
> Now I found that if one field is empty (Even if there is NULL in the
> field), then the entire label will not be displayed.
>

When the expression-based label text was introduced, NULL values supposedly
where just converted to empty strings [0], i.e. if Areatype was NULL, one
would expect at least 'm2' to be present in the label.

Try enclosing your field name Areatype in double quotes. Also, try without
the $Area function, but still with the || concatenation. If the label still
does not contain any text, then it is probably a bug in how QgsExpression
handles NULL values from the data provider. If so, please create an issue
ticket [1]. Include a test project file, and try to list reproducible
steps, if you can.

[0]
http://osgeo-org.1560.x6.nabble.com/Expression-based-labeling-tp4100735p4100736.html
[1] http://hub.qgis.org/projects/quantum-gis/issues

Regards,

Larry


> Regards
> Lene
>
>
>
> ________________________________________
> Fra: Goyo [goyodiaz at gmail.com]
> Sendt: 1. august 2013 20:40
> Til: Lene Fischer
> Cc: qgis-user at lists.osgeo.org
> Emne: Re: [Qgis-user] Label missing in Weekly
>
> 2013/8/1 Lene Fischer <lfi at life.ku.dk>:
> > Hello
> > I´m using the new labelfunction - it is great!! - but som of the labels
> are
> > missing. I have a small project with only 9 polygons, but only 7 labels
> is
> > visible.
> > I´ve tried:
> >
> > Settings to "View all labels in all layers"
> > change attributefield and size
> >
> > Same result. Any suggestions?
> > Regards
> > Lene Fischer
>
> You might have invalid geometries. They are not labelled IIRC.
>
> Goyo
>
>
> _______________________________________________
> 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/20130801/60e4fade/attachment.html>


More information about the Qgis-user mailing list