Feature request #6255

Add button to force recalculating stats of raster layers

Added by alobo - almost 5 years ago. Updated about 2 months ago.

Status:Feedback
Priority:High
Assignee:-
Category:Rasters
Pull Request or Patch supplied:No Resolution:
Easy fix?:No

Description

Currently QGIS relies on mean and sd values on the
GTif if present for stretching based on sd. Sometimes
this information can be wrong and gdalinfo -stats does
not force recalculating stats (see #5035).
The user should be able to force QGIS recalculating stats,
probably a button in Properties/Style would be a good option

History

#1 Updated by Pirmin Kalberer over 4 years ago

  • Target version changed from Version 2.0.0 to Future Release - Nice to have

#2 Updated by Paolo Cavallini almost 4 years ago

  • Category set to Rasters

#3 Updated by Médéric RIBREUX over 1 year ago

  • Status changed from Open to Feedback

Hello, bug triage...

isn't it the case when you use the "Load" button and the Extent and accuracy options in Raster Style tab ?
For me, triggering the "Load" button recalculate the stats of the raster layer.

Can you confirm this ?

#4 Updated by alobo - over 1 year ago

The stats are certainly updated if the extent is changed, but
cannot check if they do in the case the extent remains that of the whole
raster object. I realised this problem 3 y ago because it happened
that I had a geotif with wrong stats information that were not updated
in qgis. I think you must check the code to know if this is still the case:
does qgis recalculate stats or does it rely on whatever is written in the geotif?

#5 Updated by Giovanni Manghi about 2 months ago

  • Easy fix? set to No

Also available in: Atom PDF