Bug report #13811

Marker line - Negative Line offset moves symbol to the other endpoint

Added by Sandro Santilli over 8 years ago. Updated over 8 years ago.

Status:Closed
Priority:Normal
Assignee:Sandro Santilli
Category:Symbology
Affected QGIS version:2.8.3 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:21836

Description

To reproduce:
1. New project
2. Add a simple (2 vertices) LINESTRING -- for example with QuickWKT plugin
3. Go to layer properties, Style TAB
3.1. add Marker line, set "on last vertex only" and "Rotate marker" (should be already set)
3.2. pick an arrow as "Simple marker"
3.3. Change "Line offset" field in Marker placement to a negative number and see how it moves the arrow to the first vertex (from last)

This is likely a misues of GEOS OffsetCurve which is known to return a reversed line on negative offsets

Associated revisions

Revision 824fd7bf
Added by Sandro Santilli over 8 years ago

Fix endpoint swap on negative marker line offset

Fixes #13811
Includes testcase

Revision 9e80e25d
Added by Sandro Santilli over 8 years ago

[BUGFIX] Fix endpoint swap on negative marker line offset

Fixes #13811
Includes testcase

(cherr-picked from 824fd7bf32a45e278f2ec2fe9fa1c7228c9fb27f)

Revision 509a2854
Added by Nyall Dawson over 8 years ago

Fix endpoint swap on negative marker line offset

Fixes #13811
Includes testcase

(cherry-picked from 824fd7bf32a45e278f2ec2fe9fa1c7228c9fb27f)

History

#1 Updated by Sandro Santilli over 8 years ago

Confirmed, I've a working patch. While testing it I also found that an offset of -0.0 (negative zero) makes the symbol disappear

#2 Updated by Sandro Santilli over 8 years ago

Patch staged here: https://github.com/qgis/QGIS/pull/2442
If anyone has pointers to add a testcase I think it would be worth it (symbols often break).
Also, I couldn't check if the bug is still present in master.

#3 Updated by Sandro Santilli over 8 years ago

confirmed also master is affected. I'm working on an automated testcase.

#4 Updated by Sandro Santilli over 8 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF