<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">Le 20/04/2021 à 20:53, ni hao a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:DM5PR02MB38625D936B33DC37123A4CFDF1489@DM5PR02MB3862.namprd02.prod.outlook.com">
<div>
Hi list,</div>
<div>
<br>
</div>
<div>
I use Python to create GeoTiff image, and I get the error
because it exceeds 4GB.</div>
<div>
ds = gdal.GetDriverByName('GTiff').Create(output_magnitude,
xsize, ysize, 1, gdal.GDT_Float32)<br>
</div>
<div>
<br>
</div>
<div>
<span><span><span> ERROR 1: TIFFReadDirectory:Failed to read
directory at offset 4294957836</span></span></span><br>
<span><span><span> ERROR 1: TIFFWriteDirectoryTagData:Maximum
TIFF file size exceeded. Use BIGTIFF=YES creation option.</span></span></span><br>
</div>
<div>
<br>
</div>
<div>
I need to turn on <strong>
BIGTIFF=YES</strong></div>
<div>
<a href="https://gdal.org/drivers/raster/gtiff.html" id="LPlnk"
moz-do-not-send="true">https://gdal.org/drivers/raster/gtiff.html</a><br>
</div>
<div>
<br>
</div>
<div>
But I don't do know how. I tried: </div>
<div>
<span>ds =
gdal.GetDriverByName('GTiff').Create(output_magnitude, xsize,
ysize, 1, gdal.GDT_Float32, BIGTIFF=YES)</span><br>
</div>
</blockquote>
<p><span>ds = gdal.GetDriverByName('GTiff').Create(output_magnitude,
xsize, ysize, 1, gdal.GDT_Float32, options=['BIGTIFF=YES'])</span></p>
<p><span>But as you didn't specify compression, it should have done
that automatically. Can you indicate the exact values of xsize
and ysize you use ?<br>
</span></p>
<p><br>
</p>
<blockquote type="cite"
cite="mid:DM5PR02MB38625D936B33DC37123A4CFDF1489@DM5PR02MB3862.namprd02.prod.outlook.com">
<div>
</div>
<div>
<span>but it didn't work.</span></div>
<div>
<span><br>
</span></div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
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="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>