Bug report #10526

Label: line geometry labels drawn to wrong location when CRS transformed

Added by Simo Aro over 10 years ago. Updated over 5 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Map Canvas
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:end of life
Crashes QGIS or corrupts data:No Copied to github as #:18936

Description

Steps to reproduce the issue: Create new project. Drag attached GeoJSON file to layers panel. Add labels to layer with field 'name'.

Labels are diaplayed properly, all with the same distance from the line geometry.

Next, click the "CRS status" icon on the lower right corner, the "Project properties | CRS" window opens. Now, click "Enable 'on the fly' CRS transformation" checkbox and choose any transformation from the list, such as "Google Mercator" (ESPG:900913) or "ETRS89 / ETRS-TM35FIN" (ESPG:3067). Now click "OK".

The end result is that some labels are now displaced from the line geometry they belong to (see attached screen capture - the issue is evident). This issue seems to have greater effect the longer the line geometry is and the greater the zoom level is.

This bug seems to affect at least versions 2.2.0-Valmiera and 2.3.0-Master

screencapture.png (173 KB) Simo Aro, 2014-06-10 08:07 AM

ROUTES_2013.json (87.1 KB) Simo Aro, 2014-06-10 08:07 AM

53.png (192 KB) Giovanni Manghi, 2014-06-10 08:19 AM

05.png (201 KB) Giovanni Manghi, 2014-06-10 08:19 AM

38.png (220 KB) Giovanni Manghi, 2014-06-10 08:19 AM

EPSG4326.png - Before (56.8 KB) Simo Aro, 2014-06-10 02:59 PM

EPSG3047.png - After (70.5 KB) Simo Aro, 2014-06-10 02:59 PM

34.png (346 KB) Giovanni Manghi, 2014-06-11 05:09 AM

57.png (344 KB) Giovanni Manghi, 2014-06-11 05:09 AM

History

#1 Updated by Giovanni Manghi over 10 years ago

  • Status changed from Open to Feedback
  • File 53.png added
  • File 38.png added
  • File 05.png added
  • Category set to Labelling

On Linux/master I cannot seen any particular difference, see attached images

#2 Updated by Simo Aro over 10 years ago

Giovanni Manghi: This seems to affect certain parts of the world more.

Please try this location (WGS84):

Coordinate: 29.3,62.52 at scale 1:25,000

After pointing to that location, then switch to some other CRS, such as "ETRS89 / ETRS-TM35".

Please see attached screen captures for "before" and "after" effect.

#3 Updated by Giovanni Manghi over 10 years ago

  • File 57.png added
  • OS version deleted (10.8.5)
  • Operating System deleted (Mac OS X)
  • File 34.png added

Simo Aro wrote:

Giovanni Manghi: This seems to affect certain parts of the world more.

Please try this location (WGS84):

Coordinate: 29.3,62.52 at scale 1:25,000

After pointing to that location, then switch to some other CRS, such as "ETRS89 / ETRS-TM35".

Please see attached screen captures for "before" and "after" effect.

actually I think there is something fishy with the data or with the qgis reprojection, see attached images:

*) I made a copy of you json layer as a shape and transformed it to 3067 along the way. In the picture you see that the project is in 4326 and reprojection is on, so the two versions of the same layer are expected to overlap, and there are lines that do, but others don't.

*) if you then change the project CRS to 3067 and eave reprojection ON you will see that the labels (of your original json layer) are placed where the lines of the shapefile are.

So my first gut feeling is that the labels are placed in the right place, but I can't understand why saving your layer in another one with a different CRS then result in just a few features to be in the same place as the original ones (when reprojection is ON).

#4 Updated by Giovanni Manghi over 9 years ago

  • Category changed from Labelling to Map Canvas

#5 Updated by Giovanni Manghi over 9 years ago

  • Status changed from Feedback to Open

#6 Updated by Giovanni Manghi over 7 years ago

  • Regression? set to No
  • Easy fix? set to No

#7 Updated by Giovanni Manghi over 5 years ago

  • Resolution set to end of life
  • Status changed from Open to Closed

Also available in: Atom PDF