Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Data values are counted as values in the histogram #11440

Closed
qgib opened this issue Oct 30, 2008 · 16 comments

Comments

@qgib
Copy link
Contributor

commented Oct 30, 2008

Author Name: alobo - (alobo -)
Original Redmine Issue: 1380
Affected QGIS version: master
Redmine category:rasters


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

@qgib

This comment has been minimized.

Copy link
Contributor Author

commented Jul 11, 2009

Author Name: Giovanni Manghi (@gioman)


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

@qgib

This comment has been minimized.

Copy link
Contributor Author

commented Jul 27, 2009

Author Name: ersts - (ersts -)


fixed in 1c3390e (SVN r11190)


  • status_id was changed from Open to Closed
  • resolution was changed from to fixed
@qgib

This comment has been minimized.

Copy link
Contributor Author

commented Nov 8, 2009

Author Name: ersts - (ersts -)


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


  • status_id was changed from Closed to Feedback
  • resolution was changed from fixed to
@qgib

This comment has been minimized.

Copy link
Contributor Author

commented Nov 8, 2009

Author Name: Paolo Cavallini (@pcav)


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

@qgib

This comment has been minimized.

Copy link
Contributor Author

commented Nov 23, 2009

Author Name: Paolo Cavallini (@pcav)


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

@qgib

This comment has been minimized.

Copy link
Contributor Author

commented Dec 2, 2010

Author Name: alobo - (alobo -)


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


  • status_id was changed from Feedback to Open
@qgib

This comment has been minimized.

Copy link
Contributor Author

commented Oct 5, 2011

Author Name: Alister Hood (@AlisterH)


Nodata values are also counted when using the "load min/max values from band" feature on the "Style" tab.

This was supposed to be fixed a long time ago: #10916 (comment)
I guess I should probably reopen that bug, or file a new one... but it might be the same issue as this with the histogram.

Should this really be "low" priority?


  • pull_request_patch_supplied was configured as 0
@qgib

This comment has been minimized.

Copy link
Contributor Author

commented Oct 11, 2011

Author Name: alobo - (alobo -)


  • priority_id was changed from Low to High
@qgib

This comment has been minimized.

Copy link
Contributor Author

commented Dec 16, 2011

Author Name: Giovanni Manghi (@gioman)


  • fixed_version_id was changed from Version 1.7.0 to Version 1.7.4
@qgib

This comment has been minimized.

Copy link
Contributor Author

commented Dec 24, 2011

Author Name: Giovanni Manghi (@gioman)


Probably this is related/duplicate/consequence of #13898

Actually the "no data value" does not make anything NULL, it just turn the pixels transparent, but they retain they original value.


  • os_version was changed from ubuntu 8.04, ubuntu 9.04 to
  • crashes_corrupts_data was configured as 0
  • assigned_to_id removed Tim Sutton
  • operating_system was changed from Linux to
  • version was configured as master
@qgib

This comment has been minimized.

Copy link
Contributor Author

commented Jan 3, 2012

Author Name: Paolo Cavallini (@pcav)


  • priority_id was changed from High to Normal
@qgib

This comment has been minimized.

Copy link
Contributor Author

commented Apr 14, 2012

Author Name: alobo - (alobo -)


  • priority_id was changed from Normal to 6
@qgib

This comment has been minimized.

Copy link
Contributor Author

commented Apr 15, 2012

Author Name: Giovanni Manghi (@gioman)


  • priority_id was changed from 6 to High
@qgib

This comment has been minimized.

Copy link
Contributor Author

commented Apr 16, 2012

Author Name: Paolo Cavallini (@pcav)


  • fixed_version_id was changed from Version 1.7.4 to Version 1.8.0
@qgib

This comment has been minimized.

Copy link
Contributor Author

commented Sep 4, 2012

Author Name: Paolo Cavallini (@pcav)


  • fixed_version_id was changed from Version 1.8.0 to Version 2.0.0
@qgib

This comment has been minimized.

Copy link
Contributor Author

commented Oct 5, 2012

Author Name: Giovanni Manghi (@gioman)


Duplicate of #13898


  • status_id was changed from Open to Closed
  • status_info was changed from 0 to
  • resolution was changed from to duplicate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.