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.62k stars 3.01k forks source link

Natural breaks (Jenks) classes not computed correctly from expression #28299

Open qgib opened 6 years ago

qgib commented 6 years ago

Author Name: Joshua Biagio (@roehnan) Original Redmine Issue: 20479 Affected QGIS version: 3.4.1 Redmine category:symbology


QGIS doesn't compute the classes using Natural Breaks (Jenks) correctly. The first class only has one value and the subsequent classes are wrong.

Here are the classes as they should be computed: ArcMapCorrectJenks.png

Here are the classes that QGIS computes: QGISIncorrectJenks.png

Note that the first class is value - same value. Also affects v3.2.3.


qgib commented 6 years ago

Author Name: Giovanni Manghi (@gioman)


Can you attach a sample of the data?


qgib commented 6 years ago

Author Name: Joshua Biagio (@roehnan)


Giovanni Manghi wrote:

Can you attach a sample of the data?

Here is a shapefile that contains the sample data. You'll need to set the column as an expression: "Reg_Total" / "POP2000".



qgib commented 6 years ago

Author Name: Giovanni Manghi (@gioman)


gioman commented 3 years ago

Still true on the latest master.

Pedro-Murteira commented 2 years ago

Can still replicate this issue on QGIS 3.16.14 and 3.22.1.