<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
A few lines before the ones you quoted from the script dstile is set
to a raster in memory:<br>
<blockquote> dstile = self.mem_drv.Create('', self.tilesize,
self.tilesize, tilebands)<br>
</blockquote>
This memory dataset driver defaults to a datatype of byte. You need
to override this to the datatype of your choice. I'm not familiar
enough with the Python interface to be able to tell you how to do
that in Python, though.<br>
<br>
On 9/20/2014 6:20 AM, Jan Tosovsky wrote:
<blockquote type="cite">
<pre wrap="">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
_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/gdal-dev">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<br>
<br>
</body>
</html>