qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.54k stars 2.99k forks source link

Using perimeter (Curved) labels doesn't work properly #45051

Closed jimmyhenne closed 2 years ago

jimmyhenne commented 3 years ago

What is the bug or the crash?

I have a recent project created in QGIS 3.18.1 with polygons (administrative districts) labeled by Using Perimeter (Curved) mode. I labeled the names with orientation dependent position and a small distance so that the polygons are labeled inside. After having updated to 3.20.1 I noticed that the labels aren't placed properly - the orientation is mixed up and is not inside the polygons anymore.

In version 3.18.1 - the map looked like this (labeling correct, they are inside the polygons): grafik

Version 3.20.1 - labels are not correct anymore, because they are in- and also outside of the polygons: (position of red underlined labels is not correct - green underline is the correct position) 133211192-e01199a0-bd13-4693-b366-c40bccf43e0c

Steps to reproduce the issue

For me it looks like the setting "line orientation dependent position" has no effect. When clicked "Right of line" the polygons are labeled above the line which leads to the fact that the labels of a district is labeled in- and outside instead of just inside.

Zoom to e.g.: 326977,5677864 (EPSG 25832)

I saved a project file reduced to the mentioned layer and settings: label_bug.zip

I also tested 3.20.2 but this leads to the same result.

Versions

QGIS version | 3.20.1-Odense | QGIS code revision | 1c3c5cd6 -- | -- | -- | -- Qt version | 5.15.2 Python version | 3.9.5 GDAL/OGR version | 3.3.1 PROJ version | 8.1.0 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 1607   |   |   |   Active Python plugins | canvas_clipperDataDrivenInputMaskflurstueck_finderGeoCodingImportPhotosMemoryLayerSaverNNJoinqfieldsyncqgis-maptiler-pluginQuickOSMquick_map_servicesdb_managerprocessing

Supported QGIS version

New profile

Additional context

No response

gioman commented 3 years ago

@jimmyhenne on 3.20 on Windows seems fine with

image

jimmyhenne commented 3 years ago

@gioman Thanks for your quick response. I ticked both options as you mentioned and the labels changed but they are still not correct.

grafik I also added the district label forced inside the polygons to make it more clear.

The labels should be inside the polygons and curved to its shape - that was working in the project when I created it with 3.18.1

Are the labels in your project placed correctly?

pathmapper commented 3 years ago

I can reproduce the issue with master on Ubuntu 20.04.3 LTS using the provided QGIS project.

According to git bisect this regressed in https://github.com/qgis/QGIS/commit/832d5e95eef9286b5ae58be308096f5481bdc7d3 .

The issues seems to be scale dependent, see the following GIF:

gioman commented 3 years ago

The issues seems to be scale dependent

yes, I also seen the same.