[Qgis-user] Rules based style in QGIS 2.18.

Nyall Dawson nyall.dawson at gmail.com
Wed Nov 23 15:22:53 PST 2016


On 22 November 2016 at 08:49, Nyall Dawson <nyall.dawson at gmail.com> wrote:
> On 22 November 2016 at 07:36, Erik Heinz <eh0907-qgis at 42net.de> wrote:
>> Hi everyone,
>>
>> I am having problems with some rule bases style definitions thad used to
>> work up to 2.16 but do not work in 2.18 any more.  The elements in question
>> are simply not drawn.  I could not figure out any logic in what does work
>> and what does not.
>>
>> Are there any changes in rule syntax? Or removal of undocumented features?
>> I could not find any in the Changelog. Or should I suspect and report a bug?
>>
>> I am back to 2.16.2 for the moment.
>
> Can you share your rule definitions?

Erik,

I've had a look and found the issue. One of your rules uses the expression:

boundary='administrative'

In 2.18 a new boundary(...) function was introduced, so this
expression is now flagged as an error (since it's trying to call a
function without passing any arguments). Changing the filter to:

"boundary"='administrative'

Makes it work again. Wrapping boundary in " " tells QGIS that you're
referring to a field name here, not the function of the same name. In
general it's good practice to always wrap field names in " "s to avoid
this situation.


Cheers,
Nyall



>
> Nyall
>
>>
>>
>> Best regards,
>> Erik
>>
>> _______________________________________________
>> Qgis-user mailing list
>> Qgis-user at lists.osgeo.org
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user



More information about the Qgis-user mailing list