Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent or unpredictable behavior of the "offset along line" in marker/hash symbol layer #48983

Open
2 tasks
DelazJ opened this issue Jun 14, 2022 · 1 comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Symbology Related to vector layer symbology or renderers

Comments

@DelazJ
Copy link
Contributor

DelazJ commented Jun 14, 2022

What is the bug or the crash?

Among marker/hash line symbol layer properties, there's the "offset along line" allowing to "adjust" the marker/hash position with a custom distance. It can take positive or negative values. I'm trying and failing to understand the expected behavior in either case and whether these are coherent.
I'm using the "with an interval" placement option on an not closed line feature.
1/ If I set a positive offset, "original" markers are offset along the line until the end of the line, and they disappear if they would not be placed on the line. that means number of offset markers is always =< number of "original" markers
2/ If I set a negative offset value, then I get a negative offset for the first vertex of the line, meaning that there's a marker that IS NOT on the line feature (first inconsistency)
2a/ If abs(offset) =< interval, then I always get same number of offset and original markers
2b/ If for some reason, abs(offset) > interval, then more markers are added out of the original line. And here I really fail to find what the new markers belong to, from where they are offset

Using first or last vertex placement modes, which are the other modes the "offset along line" option is currently compatible with (see #48980), this does not occur: whatever positive value and unit you use the markers are ON the line or removed. They just do not react on negative values (I don't know what to think of this behavior, yet)

Steps to reproduce the issue

alongLineNeg.mp4

Versions

<style type="text/css"> p, li { white-space: pre-wrap; } </style>
QGIS version 3.25.0-Master QGIS code revision 7e51340
Qt version 5.12.8
Python version 3.8.10
GDAL/OGR version 3.0.4
PROJ version 6.3.1
EPSG Registry database version v9.8.6 (2020-01-22)
Compiled against GEOS 3.8.0-CAPI-1.13.1 Running against GEOS 3.8.0-CAPI-1.13.1
SQLite version 3.31.1
PostgreSQL client version 12.11 (Ubuntu 12.11-0ubuntu0.20.04.1)
SpatiaLite version 4.3.0a
QWT version 6.1.4
QScintilla2 version 2.11.2
OS version Ubuntu 20.04.4 LTS
       
This copy of QGIS writes debugging output.
       
Active Python plugins
trackable_project_files v1.2.2
MapsPrinter 0.9
MemoryLayerSaver 4.0.4
db_manager 0.1.20
processing 2.12.99

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

No response

@DelazJ DelazJ added Symbology Related to vector layer symbology or renderers Bug Either a bug report, or a bug fix. Let's hope for the latter! labels Jun 14, 2022
@nyalldawson
Copy link
Collaborator

Using first or last vertex placement modes, which are the other modes the "offset along line" option is currently compatible with (see #48980), this does not occur: whatever positive value and unit you use the markers are ON the line or removed. They just do not react on negative values

For reference the behaviour depends on the geometry -- if it's a closed ring then the marker placement will "wrap around" the ring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Symbology Related to vector layer symbology or renderers
Projects
None yet
Development

No branches or pull requests

2 participants