[Qgis-user] Label missing in Weekly
Nathan Woodrow
madmanwoo at gmail.com
Thu Aug 1 15:41:39 PDT 2013
QgsExpression, the base for expression labels, is just not used for labels.
It is also used for rules, actions, WFS filtering, attribute table filter.
I will consider it for string concatenation.
- Nathan
On Fri, Aug 2, 2013 at 8:28 AM, Bernd Vogelgesang
<bernd.vogelgesang at gmx.de>wrote:
> mhm,
>
> Nathan, you wrote in the ticket:
> "String + NULL = NULL. We don't treat NULL as empty string because it's
> not correct to do so. NULL and empty mean two different things so are
> treated differently."
>
> Sorry, but for "what" is that not correct? This might apply to database
> actions etc. but forcing user to make somersaults with "coalesce" (what the
> f... is that???) to prevent empty labels ... hey! It's just labeling!
>
> Making labeling a nerd-discipline is not fair ;)
>
> Just my 2 cents
> Bernd
>
> Am 02.08.2013, 00:02 Uhr, schrieb Nathan Woodrow <madmanwoo at gmail.com>:
>
>
> Hey,
>>
>> QgsExpression doesn't treat NULL and Empty string as the same thing. Which
>> is why we don't auto convert. To convert nulls in a field you should use
>> the coalesce("Areatype",'')
>>
>> See http://hub.qgis.org/issues/**8369 <http://hub.qgis.org/issues/8369>
>>
>> - Nathan
>>
>>
>> On Fri, Aug 2, 2013 at 7:35 AM, Larry Shaffer <larrys at dakotacarto.com
>> >wrote:
>>
>> 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<http://osgeo-org.1560.x6.nabble.com/Expression-based-labeling-tp4100735p4100736.html>
>>> [1] http://hub.qgis.org/projects/**quantum-gis/issues<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<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<http://lists.osgeo.org/mailman/listinfo/qgis-user>
>>>
>>>
>>>
>
> --
> Bernd Vogelgesang * Siedlerstrasse 2 * 91083 Baiersdorf * +49-9133-825374
>
> ______________________________**_________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/**mailman/listinfo/qgis-user<http://lists.osgeo.org/mailman/listinfo/qgis-user>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20130802/21ab58dc/attachment.html>
More information about the Qgis-user
mailing list