<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family:"Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;font-size:14px;background-color:rgb(255, 255, 255);display:inline !important">gdalinfo output i:</span><br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family:"Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;font-size:14px;background-color:rgb(255, 255, 255);display:inline !important">Driver: NITF/National Imagery
 Transmission Format
<div>Files: ##CH_CV_GRD\imagery\12499.ntf</div>
<div>Size is 61180, 19694</div>
<div>Coordinate System is `'</div>
<div>GCP Projection =</div>
GEOGCS["WGS 84",   ... ]<br>
</span></div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Band 1 Block=1024x1024 Type=UInt16, ColorInterp=Gray</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Band 2 Block=1024x1024 Type=UInt16, ColorInterp=Gray</span><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Also I am sure it is the UInt16 overflow, as the message is:</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
ERROR 3: Unable to read 4194302 byte block from 4324329780<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
and 2**32 = 4294967296</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> bradh@frogmouth.net <bradh@frogmouth.net><br>
<b>Sent:</b> April 6, 2021 8:17 PM<br>
<b>To:</b> Even Rouault <even.rouault@spatialys.com>; ni hao <ni_hao88@hotmail.com><br>
<b>Cc:</b> gdal-dev@lists.osgeo.org <gdal-dev@lists.osgeo.org><br>
<b>Subject:</b> Re: [gdal-dev] NITF Int16 image size limit</font>
<div> </div>
</div>
<div>
<div dir="auto">Also if you can show the headers (e.g. from gdalinfo), that might provide indication of exactly which value is the issue.
<div dir="auto"><br>
</div>
<div dir="auto">Brad</div>
</div>
<div class="x_gmail_extra"><br>
<div class="x_gmail_quote">On 7 Apr. 2021 04:00, Even Rouault <even.rouault@spatialys.com> wrote:<br type="attribution">
<blockquote class="x_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div>
<p>Please keep the mailing list copied (I re-added it)</p>
<p>This is not the most recent one (3.2.2 is), but skimming quickly through release notes, I can't see anything directly related, so it might still be current with the recent versions. Altough I see that a bunch of "avoid unsigned integer overflow" type of
 fixes have been done since 2.4, so some of them might have accidentally fixed the issue.</p>
<p>If you can try with the latest version ( Docker images mentioned at <a href="https://github.com/OSGeo/gdal/tree/master/gdal/docker">
https://github.com/OSGeo/gdal/tree/master/gdal/docker</a>, Conda, etc .), that could be interesting.<br>
</p>
<p><br>
</p>
<div>Le 06/04/2021 à 19:51, ni hao a écrit :<br>
</div>
<blockquote>
<div style="font-family:'calibri' ,'helvetica' ,sans-serif; font-size:12pt; color:rgb(0 ,0 ,0)">
Hi Even,</div>
<div style="font-family:'calibri' ,'helvetica' ,sans-serif; font-size:12pt; color:rgb(0 ,0 ,0)">
<br>
</div>
<div style="font-family:'calibri' ,'helvetica' ,sans-serif; font-size:12pt; color:rgb(0 ,0 ,0)">
The version is 2.4.4.</div>
<hr style="display:inline-block; width:98%">
<div dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Even Rouault
<a href="mailto:even.rouault@spatialys.com"><even.rouault@spatialys.com></a><br>
<b>Sent:</b> April 6, 2021 2:46 PM<br>
<b>To:</b> ni hao <a href="mailto:ni_hao88@hotmail.com"><ni_hao88@hotmail.com></a>;
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a> <a href="mailto:gdal-dev@lists.osgeo.org">
<gdal-dev@lists.osgeo.org></a><br>
<b>Subject:</b> Re: [gdal-dev] NITF Int16 image size limit</font>
<div> </div>
</div>
<div>
<p>Shawn,</p>
<p>This sounds more like a unwanted integer overflow somewhere in the NITF driver.  Is this with a recent GDAL ? If so, please file a bug at
<a href="https://github.com/OSGeo/gdal/issues/new">https://github.com/OSGeo/gdal/issues/new</a> with all the details needed. A link to the dataset would be ideal, but otherwise please provide in the ticket description the output of "gdalinfo your.nitf"</p>
<p>Even<br>
</p>
<div>Le 06/04/2021 à 19:35, ni hao a écrit :<br>
</div>
<blockquote>
<div>
<p>Hi list,</p>
<p><br>
</p>
<p>I encountered problem ingesting a large NITF Int16 image with GDAL:</p>
<p>NITF 2-band image in Int16 format, 4.3 GB. It has 19690 lines x 61180 pixels.   The upper 90% of the image looks fine.   But the last 2000 lines fail to load by GDAL.   That coincides with the 32-bit boundary.  </p>
<p><br>
</p>
<p>Note that another larger NITF in 32-bit float, 10.1 GB file loads fine.  </p>
<p><br>
</p>
<p>Is there a hard limit on NITF Int16 file size?</p>
<div>
<div>
<div>
<div> </div>
<div>Thanks,<br>
Shawn</div>
</div>
</div>
</div>
<br>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
gdal-dev mailing list
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre>-- 
<a href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</div>
</blockquote>
<pre>-- 
<a href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</body>
</html>