Bug report #20479

Natural breaks (Jenks) classes not computed correctly from expression

Added by Joshua Biagio about 6 years ago. Updated about 6 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:Symbology
Affected QGIS version:3.4.1 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:28299

Description

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:
Classes computed correctly by ESRI ArcMap

Here are the classes that QGIS computes:
Classes computed incorrectly by QGIS

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

ArcMapCorrectJenks.png - Classes computed correctly by ESRI ArcMap (113 KB) Joshua Biagio, 2018-11-13 02:59 PM

QGISIncorrectJenks.png - Classes computed incorrectly by QGIS (134 KB) Joshua Biagio, 2018-11-13 02:59 PM

totalreg.shp.zip - shapefile with sample data (17.5 KB) Joshua Biagio, 2018-11-13 04:18 PM

History

#1 Updated by Giovanni Manghi about 6 years ago

  • Status changed from Open to Feedback
  • Category changed from Unknown to Symbology

Can you attach a sample of the data?

#2 Updated by Joshua Biagio about 6 years ago

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".

#3 Updated by Giovanni Manghi about 6 years ago

  • Operating System deleted (Windows 10 64-bit)
  • Status changed from Feedback to Open

Also available in: Atom PDF