[QGIS-Developer] [Qgis-user] segments_to_lines & @geometry_part_num in QGIS 2.99 & 3.0

Anita Graser anitagraser at gmx.at
Sat May 12 08:59:44 PDT 2018


Hi,

I'd like to raise this on the dev list since it seems to be a bug. Ticket:
https://issues.qgis.org/issues/18384

Here is the basic issue as Michel observed it:

On Tue, Mar 6, 2018 at 2:47 PM, Michel Stuyts <michel.stuyts at edegem.be>
wrote:

> When creating a style for a polygon layer I noticed a difference between
> QGIS 2.99 (Windows standalone installer) and QGIS 3.0 (OSGeo4W) when I use
> segments_to_lines & @geometry_part_num.
>   *   I created a polygon layer and added some polygons.
>   *   Then I started editing the layer style:
>      *   I added a Geometry generator as symbol layer to create a
> Linestring type that contains  segments_to_lines($geometry)
>      *   Then I changed the line type of the result to a "Marker line"
>      *   Then I changed the Symbol layer type of this "Marker line" to
> "Font marker"
>      *   Then I changed the "Data defined override" of the content of this
> font marker to @geometry_part_num
>      *   Then I changed the font size of the font marker
> The results are different in QGIS 2.99 and 3.0 (see images below). Is this
> a bug in 3.0 or is it an intentional change? The result in QGIS 2.18 is the
> same as in 2.99. The result in QGIS 3.1 is the same as in 3.0.
>

​I've actually been able to reproduce 2.18 results in 3.x but only if
@geometry_part_num was used in a different context besides the marker line
as well.

Here's a screencast of what I think is pretty odd behavior:
https://www.dropbox.com/s/cvyqeecpq0uis1j/QGIS%20Geometry%20Generator%20geometry_part_num.mp4?dl=0

Took me a couple of hours to find out why @geometry_part_num behaved
seemingly randomly.

Was this a purposeful change?

Regards,
Anita
​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20180512/ed8a4c01/attachment.html>


More information about the QGIS-Developer mailing list