Opened 15 years ago
Closed 15 years ago
#1397 closed bug (fixed)
continuous colour showing incorrect min/max values in legend
Reported by: | pcreso | Owned by: | nobody |
---|---|---|---|
Priority: | major: does not work as expected | Milestone: | Version 1.0.3 |
Component: | Symbology | Version: | Trunk |
Keywords: | continuous, postgis | Cc: | pcav |
Must Fix for Release: | No | Platform: | SuSE |
Platform Version: | Awaiting user input: | no |
Description
When opening a PostGIS table, the features intially plot fine. If I then choose continuous colour (symbology) & select the field to use to define the colours, the max value displayed in the LHS legend for the layer bears no resemblance to the actual values of the selected column, eg: 111.0000 is shown, but the dataset has values well into the thousands. Similarly, the min value shown in the legend is 0.00000, but the attribute table, sorted on the column, shows a minimum of 2.1
The correct values are shown in the attribute table, and if classification ranges are used instead of continuous colour, the correct numbers are shown in the legend.
As far as I can tell from looking at the map canvas, the colours are assigned appropriately, just the legend is incorrect, but I cannot confirm this.
Change History (5)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
Keywords: | continuous postgis added |
---|
I have also seen this on OS X and Ubuntu Intrepid. There also seems to be a problem with the drop down that selects which column is to be rendered in that not all of the columns from the attribute table are available and the values displayed for the legend do not correspond to the selected field, perhaps an index-off-by-one situation. When I ogr2ogr my data to a shapefile, everything works fine, except of course that I can't use the query builder but rather rely on ogr2ogr -where to extract the subsets.
comment:3 by , 15 years ago
Only the columns of type int or double are available in continuous color classification (not possible e.g. with string types of course).
The off by one bug: is this still true in current svn version?
Regards, Marco
comment:4 by , 15 years ago
Cc: | added |
---|
I made a few testes with QGIS 1.2 (rev. 11005, ubuntu 9.04) with both postgis and shapefile layers, and it shows correct min/max values.
The only thing I notice is that if the value is a decimal number, in the legend is shown with a precision that the value in the attribute table doesn't have. Ex.
542.894 --> 542.894000
Please check again with the latest version under your platform, if the bug is solved we can close this.
When opening a PostGIS table, the features intially plot fine. If I then choose continuous colour (symbology) & select the field to use to define the colours, the max value displayed in the LHS legend for the layer bears no resemblance to the actual values of the selected column, eg: 111.0000 is shown, but the dataset has values well into the thousands. Similarly, the min value shown in the legend is 0.00000, but the attribute table, sorted on the column, shows a minimum of 2.1
The values shown, and the assigned colours are in fact from another column than the selected one, the prvious numeric column in the table.
The correct values are shown in the attribute table, and if classification ranges are used instead of continuous colour, the correct numbers for the selected column are shown in the legend.