<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 9/20/2014 9:02 AM, Jan Tosovsky
wrote:<br>
</div>
<blockquote
cite="mid:006601cfd4e3$dc8656d0$95930470$@tosovsky@email.cz"
type="cite">
<pre wrap="">But the final tif has most likely incorrect metadata as its reading via
jai-imageio fails ArrayIndexOutOfBoundsException: 256
(Despite the Ok result when reading the tiling source image using the same
method)
Any idea?
Thanks, Jan
</pre>
</blockquote>
<br>
<blockquote type="cite">
<pre wrap="">Adding an extra parameter seems to be fixing this:
dstile = self.mem_drv.Create('', self.tilesize, self.tilesize, tilebands,
gdal.GDT_UInt16)
(applied to all 'mem_drv.Create' occurrences)</pre>
</blockquote>
<br>
Looking back at the code, the actual output file is created with
this line:<br>
<blockquote>
self.out_drv.CreateCopy(tilefilename, dstile, strict=0)<br>
<br>
</blockquote>
This will also need to be set to the correct datatype.<br>
<br>
<br>
If this still doesn't fix it, the first thing to do is run gdalinfo
against one of the tiles and let us know the result. If it really is
producing bogus meta-data (which would surprise me), that will set
off alarm bells for a number of readers of this mailing list. If, on
the other hand, the meta-data is fine, it will prompt some thinking
in other directions. <br>
<br>
<br>
<br>
<br>
</body>
</html>