Bug report #4560

wrong scale displayed in map canvas

Added by Regis Haubourg over 12 years ago. Updated over 12 years ago.

Status:Closed
Priority:High
Assignee:Giuseppe Sucameli
Category:-
Affected QGIS version: Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:14473

Description

Hi ,
I upgraded Qgis 1.1 to 1.7.2 this morning. There is a major bug in map scale display in map canvas. It displays enormous numbers. I'm under Windows XP. I used standalone installer. project projection and data are epsg 2154 (France Lambert 93).
Side effect of this, all visibility levels are misinterpreted by qgis.

In my opinion, this is a critical bug, if confirmed, and requires an update of installers recently launched.

Régis

scale_bug.jpg (207 KB) Regis Haubourg, 2011-11-22 06:07 AM

lacs.zip (437 KB) Regis Haubourg, 2011-11-22 07:08 AM

History

#1 Updated by Regis Haubourg over 12 years ago

I upgraded 1.7.1 to 1.7.2 not "1.1 to 1.7.2

#2 Updated by Gary Sherman over 12 years ago

  • Project changed from 4 to QGIS Application
  • Assignee deleted (Gary Sherman)

Filed under wrong project. Moved to QGIS

#3 Updated by Regis Haubourg over 12 years ago

Sorry for that Gary. Régis

#4 Updated by Regis Haubourg over 12 years ago

The bug seems related to projection behaviour.
When i switch project projection to IGN:LAMB93 (ID10089), scale is OK. When I go back to epsg 2154, wrong scale comes back.

EPSG:2154 is the old epsg definition for lambert 93. Datas I use are defined in EPSG:2154. 
If i reproject on the fly to 4326 WGS84, scale stays wrong. If I switch to IGN:LAMB93, then switch to 4326, scale is OK..

régis

#5 Updated by Richard Duivenvoorde over 12 years ago

seems a small dataset, can you make it available to this issue?

#6 Updated by Regis Haubourg over 12 years ago

Here comes a dataset that reproduce the bug on my computer.
Régis

#7 Updated by Richard Duivenvoorde over 12 years ago

I've installed 1.7.2 on a fresh XP here

Loading your data in it, makes it a epsg:4326 project with your data loaded as epsg:2154 (which is ok). At that moment the scale shows huge numbers (as you show),

BUT after setting the project crs to epsg:2154 also AND setting the units to meters (were degrees with me, don't know why. epsg:2154 is a projected crs isn't it?), the scale seems ok to me?

#8 Updated by Regis Haubourg over 12 years ago

I think you found the bug. It seems that Qgis keep decimal degrees as units in memory, when on the fly reprojection activated. User interface is greyed out and meters are checked as units on screen.

Playing with those parameters (activating meters units / checking on the fly reprojection) generates Qgis crashes! Something strange lying under.

#9 Updated by Richard Duivenvoorde over 12 years ago

  • Target version set to Version 1.7.2

yes, confirmed here both on a machine running XP with osgeo4w (and upgrading from 1.7.0 to 1.7.2) and a machine running XP where I installed a fresh 1.7.2 via the standalone installer:

- as soon as you have some 'recently used coordinate reference systems', and you try to select one in the crs tab of the Project properties, go to the first tab and then back to the crs tab qgis just crashes. In the event viewer there is only a message about a crash in a qt-treewidget

- on the osgeo4w I also installed the dev/nightly version, and that one does NOT have the problem

#10 Updated by Giuseppe Sucameli over 12 years ago

The problem was fixed in master by 62ed7ef86b866bd5dd2f8c750cd21e3ffafa5911.

#11 Updated by Anita Graser over 12 years ago

I can confirm the crashes Richard described in 1.7.2 on Ubuntu.

#12 Updated by Werner Macho over 12 years ago

  • Status changed from Open to Closed
  • Assignee set to Werner Macho
  • Resolution set to fixed

applied patch 62ed7ef86b866bd5dd2f8c750cd21e3ffafa5911 into release-1_7 to prepare for 1.7.3 release
gotta take a look if is is already fixed in upcoming 1.8
closing this for now as it works (for me) after applying the patch

#13 Updated by Giuseppe Sucameli over 12 years ago

Anita Graser wrote:

I can confirm the crashes Richard described in 1.7.2 on Ubuntu.

And I fixed that crash in master by commit 98d5a7665ce75bc2f406e89f4efc755995d30a73

#14 Updated by Giuseppe Sucameli over 12 years ago

Werner Macho wrote:

applied patch 62ed7ef86b866bd5dd2f8c750cd21e3ffafa5911 into release-1_7 to prepare for 1.7.3 release
gotta take a look if is is already fixed in upcoming 1.8
closing this for now as it works (for me) after applying the patch

You should backport also commit c0dc60b9d30bb0d1ed2f4c814e6169c87ac376ce, both this and mine (98d5a7665ce75bc2f406e89f4efc755995d30a73) fixed crashes in select projection dialog due to commit 2034d59a2f503f7bec3d2f15c163d37e661ec26b (a very dangerous change because it's into a showEvent method: a one-line change has required 2 other commit to work well again!).

#15 Updated by Giuseppe Sucameli over 12 years ago

  • Resolution deleted (fixed)

I hope that removing ticket resolution will re-open the ticket.

#16 Updated by Giuseppe Sucameli over 12 years ago

  • Resolution set to fixed

No, no way to reopen the ticket... Ok, I'm going to open a new ticket for the crashes.

#17 Updated by Werner Macho over 12 years ago

  • Resolution changed from fixed to worksforme
  • Assignee changed from Werner Macho to Giuseppe Sucameli

#18 Updated by Giuseppe Sucameli over 12 years ago

  • Resolution changed from worksforme to fixed

Now this ticket is really fixed in release-1_7 branch, commit ids:
05e70ff49801583418755f7d2d65acd8301cdf36
70e2dc3b8fda8cdc0c730cfcc9fddbbbe2627ce9

Thanks macho for the backports!

Also available in: Atom PDF