[GIS] Converting a multiband raster to a single band raster wipes off its values

gdalgdal-translategeotiff-tiffmulti-bandraster

I have a multi-band raster and I am using

gdal_translate -b 1 -scale 30 30 landscape.lcp band_1.tif

to get a single band in tif format. Now if I check values of band 1 in landscape.lcp, those lie between 0 -270. But if I check values in band1.tif, the values lie between -32768- 32767. Any pointer how to keep the original values in the band_1.tif file.

Best Answer

It seems like you don't want to rescale the input pixel values (-scale) but set the target resolution (-tr), so try with:

gdal_translate -b 1 -tr 30 30 landscape.lcp band_1.tif
Related Question