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

Line Symbol offset can't be negative when using a CRS with degree units and 'Meters at Scale' #45298

Closed
1 of 2 tasks
lawrence-n opened this issue Sep 28, 2021 · 1 comment · Fixed by #45309
Closed
1 of 2 tasks
Assignees
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

@lawrence-n
Copy link

What is the bug or the crash?

When using a CRS with degree units, attempting to use a negative offset with 'Meters at Scale' units will draw at the positive offset. This bug affects various symbol layer types for lines and polygons.

I think this is because QgsRenderContext::convertMetersToMapUnits will always return a positive value when the CRS uses degrees.

Steps to reproduce the issue

  1. Use a line symbol with a negative offset using 'Meters at Scale' units.
  2. Change the project's CRS between coordinate systems measured in metres and degrees.
  3. Note that the symbol layer with the negative offset will switch sides when the CRS changes.

Versions

QGIS version
3.20.0-Odense
QGIS code revision
decaadb
Qt version
5.15.2
Python version
3.9.5
GDAL/OGR version
3.3.0
PROJ version
8.0.1
EPSG Registry database version
v10.018 (2021-04-02)
GEOS version
3.9.1-CAPI-1.14.2
SQLite version
3.35.2
PDAL version
2.3.0
PostgreSQL client version
13.0
SpatiaLite version
5.0.1
QWT version
6.1.3
QScintilla2 version
2.11.5
OS version
Windows 10 Version 2009

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

@lawrence-n lawrence-n added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Sep 28, 2021
@gioman gioman added the Symbology Related to vector layer symbology or renderers label Sep 28, 2021
@gioman
Copy link
Contributor

gioman commented Sep 28, 2021

3.20.0-Odense
Supported QGIS version

@lawrence-n maybe won't change anything but better test with a recent release, 3.20.0 is already behind many bug fixes.

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

Successfully merging a pull request may close this issue.

3 participants