Ticket #983 (closed bug: fixed)

Opened 5 years ago

Last modified 4 years ago

"Graduated Symbol" symbology: wrong numeric ranges

Reported by: msieczka Owned by: nobody
Priority: major: does not work as expected Milestone: Version 1.0.3
Component: Symbology Version: Trunk
Keywords: Cc:
Platform Version: Platform: All
Must Fix for Release: Yes Awaiting user input: no

Description

There are following values in the numeric column of a vector layer: 0, 1, 2, 3.

Go to Layer Properties > Symbology > Graduated Symbol to build a legend for it.

If the number of classes is 1, QGIS creates the range as "0.999 - 3.001". Why is 0 omitted and why is max grater than 3? The range should be "0 - 3".

For 2 classes I get: "0.999 - 2.000" and "2.000 - 3.001". Besides wrong min and max like above, I think that "2.000" should not be included in both ranges. Moreover, as the input are integer numbers, decimal numbers should not be present - they suggest different numeric precision than the input data actually have.

Attachments

nmb.tar.bz2 Download (0.7 KB) - added by msieczka 5 years ago.
example Shapefile to reproduce the bug

Change History

follow-up: ↓ 2   Changed 5 years ago by jef

  • status_info set

what data source does this apply to?

in reply to: ↑ 1   Changed 5 years ago by msieczka

Replying to jef:

what data source does this apply to?

I tried PostGIS and Shapefile - the bug applies to both.

Check with the attached Shapefile first, then after importing it into PostGIS (thanks for fixing SPIT!!!). You should be a ble to reproduce the bug with either data source.

Changed 5 years ago by msieczka

example Shapefile to reproduce the bug

  Changed 5 years ago by msieczka

  • status_info unset

  Changed 5 years ago by timlinux

  • status changed from new to closed
  • resolution set to fixed

Tested in SVN trunk r9470 and graduations run from -0.001 to +4.001. Works for me, I'm closing this ticket, please reopen if problems persist.

  Changed 4 years ago by msieczka

  • status changed from closed to reopened
  • resolution fixed deleted

This bug is only partialy fixed.

The attached Shapefile has the following values in the floating point column 'nmb': 0.0, 1.0, 2.0, 3.0.

Try to classify it with "graduated symbol", one class - the data range according to QGIS is '-0.001 - 4.001'. This exceeds the actual data range which is '0 - 4'.

  Changed 4 years ago by pcav

  • milestone changed from Version 1.0.0 to Version 1.0.1

  Changed 4 years ago by lutra

Tested now on QGIS 1.2 (rev. 10988) with the provided shapefile (one column, "nmb", with values 0,1,2,3,4).

with 1 classes and "mode" is "quantiles" qgis creates the range "0.000000 - 4.000000"

with 1 classes and "mode" is "equal interval" qgis creates the range "-0.001 - 4.001"

with 2 classes and "mode" is "quantiles" qgis creates the ranges "0.000000 - 2.000000" and "2.000000 - 4.000000"

with 2 classes and "mode" is "equal interval" qgis creates the ranges "-0.001 - 2.000" and "2.000 - 4.001"

I'm not sure the problem has been solved.

  Changed 4 years ago by mhugent

  • status changed from reopened to closed
  • resolution set to fixed

Fixed in r10989

Note: See TracTickets for help on using tickets.