Opened 15 years ago

Last modified 13 years ago

#1380 new bug

No Data values are counted as values in the histogram

Reported by: alobo Owned by: timlinux
Priority: major: does not work as expected Milestone: Version 1.7.0
Component: Rasters Version: Trunk
Keywords: Cc: jdenisgiguere@…, pcav
Must Fix for Release: Yes Platform: Linux
Platform Version: ubuntu 8.04, ubuntu 9.04 Awaiting user input: no

Description

After setting a given value as No Data for a raster, the histogram and min-max statistics are not updated. Y axis in the histogram is often too high

Change History (11)

comment:1 by jdenisgiguere, 15 years ago

Cc: jdenisgiguere@… added

comment:2 by lutra, 15 years ago

Cc: pcav added
Milestone: Version 1.0.3Version 1.2.0
Platform Version: ubuntu 8.04ubuntu 8.04, ubuntu 9.04

Seems to me still true on qgis 1.2 from trunk under Ubuntu 9.04

comment:3 by ersts, 15 years ago

Resolution: fixed
Status: newclosed

fixed in r11189

comment:4 by ersts, 14 years ago

Resolution: fixed
Status: closedreopened

I have to reopen this. The nodata values were removed from the raster band stats, but they are still showing up in the histogram. It is either something to do with the GDALGetRasterHistogram() or the logic behind which bins to display in QgsRasterLayerProperties::on_pbnHistRefresh_clicked() or a combination of both

comment:5 by pcav, 14 years ago

Perhaps related to that: if you build pyramids, the histogram will count all the cells from all levels of pyramids as valid values, thus giving inflated and incorrect results

comment:6 by pcav, 14 years ago

Confirmed this in Windows XP, not in a fresh Debian box

comment:7 by jef, 14 years ago

Milestone: Version 1.2.0Version 1.5.0

comment:8 by pcav, 14 years ago

Milestone: Version 1.5.0Version 1.6.0

comment:9 by alobo, 13 years ago

Owner: changed from ersts to timlinux
Status: reopenednew

Hi Agus,

As far as I know this is so because your raster does not define a null value in the GDAL sense (use GDAL tools to set a null value for that raster, NOT the QGIS raster properties)

Yes (as extremely delayed feedback to Benoit too) I plan to rewrite the raster histogramming at some point to not use gdal so that we can take into account user defined transparency settings etc. I will do this when I get a few hours to spare!

Regards

Tim

Hope this helps, Benoit

On 01/12/2010 17:14, Agustin Lobo wrote:

Raster histograms include null values, which in many cases severely distorts the histograms (i.e., images in which a large part of ocean is present or just images in which the scene is not a rectangle) Also, the ability to customize the axes (in particular the x axis) is very important

comment:10 by pcav, 13 years ago

Must Fix for Release: YesNo

comment:11 by alobo, 13 years ago

Must Fix for Release: NoYes
Note: See TracTickets for help on using tickets.