On 9/20/2014 9:02 AM, Jan Tosovsky wrote:
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

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)

Looking back at the code, the actual output file is created with this line:
                    self.out_drv.CreateCopy(tilefilename, dstile, strict=0)

This will also need to be set to the correct datatype.


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.




_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to