[gdal-dev] gdal2tiles for 16bit data

Jan Tosovsky j.tosovsky at email.cz
Sat Sep 20 05:20:41 PDT 2014


Dear All,

I am trying to produce GeoTiff tiles from my SRTM based GeoTiff:

gdal2tiles.py -z 6-7 warped.tif D:\tiles-gdal

The problem is that the final data is somehow converted from 16bit into 8bit
so useless for intended further processing.

In the script there are following lines responsible for r/w operations:

data = ds.ReadRaster(rx, ry, rxsize, rysize, wxsize, wysize,
band_list=list(range(1,self.dataBandsCount+1)))
dstile.WriteRaster(wx, wy, wxsize, wysize, data,
band_list=list(range(1,self.dataBandsCount+1)))

Just a naive idea, could this be somehow edited to get the proper result?

I believe there is a solution as all translate->merge->warp steps kept the
16bit intact.

Thanks, Jan

Win7/GDAL 1.10




More information about the gdal-dev mailing list