Bug report #18302

QGIS2+: values shown in scientific notation

Added by Tobias Wendorff about 6 years ago. Updated about 6 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Vectors
Affected QGIS version:3.0.0 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:26193

Description

Right now, values like "4176000000" are displayed as "4.176e+06" (the scientific notation). Seems like printf '%g' is used?

The problem appears anywhere, values are shown:
  • attribute tables
  • tooltips
  • legend
  • etc

And it's around for a pretty long time: #15880

After a lively discussion on the QGIS-mailing list, the following options might be useful:
  • never show values in scientific notations
  • mixup like now
  • always show scientific notations

A simple workaround might be casting the full float/double values to string for displaying them.

scientific.png (32.6 KB) Tobias Wendorff, 2018-04-14 06:31 AM


Related issues

Duplicates QGIS Application - Bug report #15880: Symbol Size assistant: Values greater than 1 000 000 are ... Closed 2016-11-22

Associated revisions

Revision 054470f0
Added by Nyall Dawson about 6 years ago

Never show int/long attributes in scientific notation

Fixes #18508, #18302

Revision 1d102b29
Added by Nyall Dawson about 6 years ago

Never show int/long attributes in scientific notation

Fixes #18508, #18302

(cherry-picked from 054470f)

History

#1 Updated by Giovanni Manghi about 6 years ago

  • Status changed from Open to Closed
  • Resolution set to duplicate

See #15880

#2 Updated by Jürgen Fischer about 6 years ago

  • Description updated (diff)

#3 Updated by Harrissou Santanna about 6 years ago

Giovanni, this report is more global and proposed some solutions to the issue.
If there's a report to close, should it not be #15880 instead?

#4 Updated by Jürgen Fischer about 6 years ago

  • Duplicates Bug report #15880: Symbol Size assistant: Values greater than 1 000 000 are not "correctly" rendered in the legend added

#5 Updated by Giovanni Manghi about 6 years ago

  • Status changed from Closed to Open
  • Resolution deleted (duplicate)
  • Category changed from GUI to Vectors

#6 Updated by Giovanni Manghi about 6 years ago

  • Status changed from Open to Closed

See #15880

#7 Updated by Arjan Mossel about 6 years ago

This issue is now marked closed, and #15880 is marked duplicate. But was this actually fixed?

#8 Updated by Giovanni Manghi about 6 years ago

  • Status changed from Closed to Open

#9 Updated by Mike Taves about 6 years ago

Also duplicate in #18508, with description of affected components.

#10 Updated by Nyall Dawson about 6 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

#11 Updated by Tobias Wendorff about 6 years ago

Sorry, still doesn't seem to be fixed: I'm on 6ddd9ab0c7 (from 2018-03-30, which is newer than 054470f0 from 2018-03-28) and "attribute table" and "identify tool" still show scientific notation.

#12 Updated by Andreas Wicht about 6 years ago

I currently have the issue that QGIS 2.18.18 displays an ID as 1385998 (Identify Tool) whereas QGIS 3.0.1 shows that features' ID as 1.386e+06 which is even worse...

any news on the current state of development?

#13 Updated by Tobias Wendorff about 6 years ago

On some places it has been fixed, on many it hasn't. See attachment.

I'm on QGIS3, GIT build af8d9eb1a6

Also available in: Atom PDF