Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#3889 closed defect (fixed)

gdal_translate -scale doesn't update metadata

Reported by: giohappy Owned by: warmerdam
Priority: normal Milestone: 1.8.0
Component: GDAL_Raster Version: svn-trunk
Severity: normal Keywords: metadata scale

Description (last modified by giohappy)

I've noticed that scaling the values of a raster through gdal_translate -scale option doesn't update the grid metadata values.

I've run:

gdal_translate -scale 0.01 2.09 -a_nodata -99999 

Tha raster has been correctly reclassified to 0-255 values but gdalconfig still shows the original values range:

Min=0.012 Max=2.093
Minimum=0.012, Maximum=2.093, Mean=0.794, StdDev=0.090
NoData Value=0

Change History (4)

comment:1 by giohappy, 12 years ago

Description: modified (diff)

comment:2 by Even Rouault, 12 years ago

Resolution: fixed
Status: newclosed

Fixed in trunk in r21385

comment:3 by Even Rouault, 12 years ago

r21386: add a -stats option to force (re)computation of statistics

comment:4 by giohappy, 12 years ago

Impressive quick fix! Thanks Even.

Note: See TracTickets for help on using tickets.