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

Negative values are classified incorrectly using new symbology #15442

Closed
qgib opened this issue Jul 25, 2012 · 5 comments
Closed

Negative values are classified incorrectly using new symbology #15442

qgib opened this issue Jul 25, 2012 · 5 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Symbology Related to vector layer symbology or renderers
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Jul 25, 2012

Author Name: Wes Meltzer (Wes Meltzer)
Original Redmine Issue: 6096
Affected QGIS version: master
Redmine category:symbology


In the new symbology mode, at least in 1.8.0, several classification modes render negative real values as though they were positive values. This occurs with Quantile, Natural Breaks and Standard Deviation classifications. It also fails completely to classify percentages stored as reals (-1 to 1) in Equal Interval and Pretty Breaks modes.

I have import data (from either CSV or XLS) and join it to a vector layer. The data is attached, although with identifying information stripped out because it's embargoed.

The values range from -0.0791 to 0.0165 and are stored as reals. The classifications are a mess; for instance, here's the classification in Quantile mode, in order from lightest color to darkest for 7 categories:

0.0000 - -0.0342
-0.0342 - -0.0185
-0.0185 - 0.0000
0.0000 - 0.0000
0.0000 - 0.0000
0.0000 - 0.0000
0.0000 - 0.0165

I don't know why it includes three categories of 0-0, but it leads to misleading categorization. The data has a MIN() of -0.0791 so it should be something like

-0.0791 - -0.0345
-0.0342 - -0.0185
-0.0185 - 0.0000
0.0000 - 0.0165

off the top of my head, although of course that's only 4 categories. There are 56 data points, so it's not for lack of trying.


@qgib
Copy link
Contributor Author

qgib commented Jul 25, 2012

Author Name: Giovanni Manghi (@gioman)


Can you check if this is a regression since 1.7.4?


  • status_id was changed from Open to Feedback
  • category_id was configured as Symbology

@qgib
Copy link
Contributor Author

qgib commented Jul 25, 2012

Author Name: Wes Meltzer (Wes Meltzer)


Giovanni Manghi wrote:

Can you check if this is a regression since 1.7.4?

Short answer: no. I never upgraded from 1.7.1 to 1.7.4 (lazy) but this issue is present in 1.7.1. It's hard to believe I never had a data set consisting of mostly negative reals with 1.7!

Note: I discovered one issue that is a red herring. The weirdness with the excess 0.00 values listed above is actually a problem with the dataset the database reporter generated, which only showed up in quantiles mode. Too many null values. This is not an issue with the Quantiles categorization. The negative numbers issue remains if I change the mode, however.

Here is the Jenks categorization for 1.7.1 and 1.8.0:

0.0000 - -0.0714
-0.0714 - -0.0420
-0.0420 - -0.0282
-0.0282 - -0.0185
-0.0185 - -0.0083
-0.0083 - 0.0030
0.0030 - 0.0165

which is still erroneous without manually changing the order of processing. Top line should be -0.0791 - -0.0714.

@qgib
Copy link
Contributor Author

qgib commented Jul 27, 2012

Author Name: Giovanni Manghi (@gioman)


  • status_id was changed from Feedback to Open
  • fixed_version_id was configured as Version 2.0.0

@qgib
Copy link
Contributor Author

qgib commented Mar 3, 2013

Author Name: Nyall Dawson (@nyalldawson)


By my testing this is fixed by pull request 453:

#453

@qgib
Copy link
Contributor Author

qgib commented Mar 4, 2013

Author Name: Nathan Woodrow (@NathanW2)


Fixed in changeset "7c0746b091498dbe741c34396f7da5bff51030da".


  • status_id was changed from Open to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Symbology Related to vector layer symbology or renderers labels May 24, 2019
@qgib qgib added this to the Version 2.0.0 milestone May 24, 2019
@qgib qgib closed this as completed May 24, 2019
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

No branches or pull requests

1 participant