[gdal-dev] use scale in gdal_translate
Limei Ran
lran at unc.edu
Mon Feb 25 12:20:07 EST 2008
Hi:
I used the following command to scale a image file:
gdal_translate landcover14.img -scale 0 127 0 0 -OF HFA out.img
I thought all pixel values in out.img should be 0. But, when I use
gdalinfo out.img, I saw the same information as those in the original
image, such as:
=======================
.....
Band 1 Block=64x64 Type=Byte, ColorInterp=Palette
Description = Layer_1
Min=11.000 Max=127.000
Minimum=11.000, Maximum=127.000, Mean=100.336, StdDev=38.292
Metadata:
STATISTICS_MINIMUM=11
STATISTICS_MAXIMUM=127
STATISTICS_MEAN=100.3361000425
STATISTICS_MEDIAN=127
STATISTICS_MODE=127
STATISTICS_STDDEV=38.292430309159
STATISTICS_HISTONUMBINS=256
STATISTICS_HISTOMIN=0
STATISTICS_HISTOMAX=255
......
===============================
I thought min and max should be 0 after scaling. Could you tell me
whether there is any problem?
Thanks,
Limei
More information about the gdal-dev
mailing list