[Qgis-user] data defined style with $scale
Andreas Neumann
a.neumann at carto.net
Tue Nov 19 08:09:24 PST 2013
Thanks for checking - so it is a QGIS rendering issue and has nothing to
do with data-defined styling.
A new feature would still be the ability to draw or not draw a feature
(boolean) based on an expression. Would be interesting to have in some
cases.
Andreas
Am 2013-11-19 16:15, schrieb Ziegler Stefan:
> Hi
>
> I just tried a line-width "0" and it is rendered (no data defined
> stuff, only simple styling).
>
> Regards
> Stefan
>
>> -----Ursprüngliche Nachricht-----
>> Von: Andreas Neumann [mailto:a.neumann at carto.net]
>> Gesendet: Dienstag, 19. November 2013 14:15
>> An: Ziegler Stefan
>> Cc: qgis-user at lists.osgeo.org
>> Betreff: Re: [Qgis-user] data defined style with $scale
>>
>> Hi,
>>
>> If a line-width with "0" is rendered than it is a rendering issue and
>> not a logical issue.
>>
>> The CASE WHEN ELSE END statement always returns a value. That's what I
>> meant that
>> it seems logical to me.
>>
>> I don't think that QGIS does suppress the rendering of lines with zero
>> width. It just
>> passes it on to the render with a line-width value of zero. If the
>> renderer still draws
>> the line it is a bug in the renderer.
>>
>> Of course could check if the line-width is zero and suppress the line.
>> But I don't know much about the renderer internals to know how QGIS is
>> handling it.
>>
>> Andreas
>>
>> Am 2013-11-19 13:16, schrieb Ziegler Stefan:
>> > Hi Andreas
>> >
>> > for me it seems unlogical. The CASE-WHEN-ELSE statement is returning
>> > zero for scales larger than 1000. So I don't see any reason why QGIS
>> > draws a line with an unpredictable line-width.
>> >
>> > I do not have access at the very moment to QGIS. But what happens when
>> > you just enter 0.0 as data defined line-width?
>> >
>> > regards
>> > Stefan
>> >
>> > Von meinem iPad gesendet
>> >
>> >> Am 19.11.2013 um 11:59 schrieb "Andreas Neumann"
>> >> <a.neumann at carto.net>:
>> >>
>> >> Hi Stefan,
>> >>
>> >> This seems logical to me. The data-defined styling only changes a
>> >> graphical property. It does not control whether a feature is drawn or
>> >> not. You could set it to fully transparent, but this would still
>> >> fetch features and draw them (though invisible).
>> >>
>> >> If you want to suprress features above a certain level you may do
>> >> that on the layer level in the "General settings" (or something similar).
>> >>
>> >> The labels individually allow to suppress labels based on a column or
>> >> expression, but the data-defined symbology does not allow that so far.
>> >> It would be a new feature to ask for.
>> >>
>> >> Andreas
>> >>
>> >> Am 2013-11-19 07:50, schrieb Ziegler Stefan:
>> >>> Hi
>> >>> I have a question regarding data defined styling. I'm using the
>> >>> $scale parameter to define the line width:
>> >>> CASE
>> >>> WHEN $scale <= 500.0 THEN 1
>> >>> WHEN ($scale > 500 AND $scale <= 1000) THEN 0.5 END I would expect
>> >>> that the line is not drawn with a scale larger than 1000. But it
>> >>> seems the line is still drawn. It even draws the line with an
>> >>> ELSE-statement:
>> >>> CASE
>> >>> WHEN $scale <= 500.0 THEN 1
>> >>> WHEN ($scale > 500 AND $scale <= 1000) THEN 0.5 ELSE 0.0 END It
>> >>> seems that I get my expected result when I use an ELSE value near
>> >>> zero (e.g. 0.0000001).
>> >>> Is this on purpose? Or is there an error in my statement?
>> >>> regards
>> >>> Stefan
>> >>> Freundliche Grüsse
>> >>> Stefan Ziegler
>> >>> Kantonsgeometer
>> >>> Amt für Geoinformation
>> >>> Amtliche Vermessung
>> >>> Rötistrasse 4
>> >>> 4500 Solothurn
>> >>> Telefon +41 32 627 75 96
>> >>> Telefax +41 32 627 75 98
>> >>> stefan.ziegler at bd.so.ch
>> >>> http://www.so.ch
>> >>> _______________________________________________
>> >>> 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
More information about the Qgis-user
mailing list