<div dir="ltr"><div dir="ltr">You need to count tiles in the row, not pixels.<br><br>ceil(126015/128)*3*8*128*128 = <span style="color:rgb(0,0,0);font-family:monospace">387 118 080 = half a gigabyte.</span></div><span style="font-family:monospace"><br></span></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Mar 13, 2021 at 12:08 AM <<a href="mailto:Matt.Wilkie@yukon.ca">Matt.Wilkie@yukon.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-CA">
<div class="gmail-m_-3955870615026465914WordSection1">
<div>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">>
</span><span style="font-size:10pt;font-family:Calibri,sans-serif">You need to enlarge cache size (</span><span style="font-size:9.5pt;font-family:Consolas;color:teal;background:rgb(236,253,240)">GDAL_CACHEMAX</span><span style="font-size:10pt;font-family:Calibri,sans-serif">)
 so that it can fit the uncompressed tiles of one single row of your image. <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)">Oh, ok. What’s the formula for that? A single row of pixels X num bands X bit-depth? Or Block-size X bands X depth?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)">Given a source of:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal" style="margin-left:36pt"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)">Size is 126015, 68149<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:36pt"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)">Band 1 Block=128x128 Type=Byte, ColorInterp=Red<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:36pt"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)">Band 2 Block=128x128 Type=Byte, ColorInterp=Green<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:36pt"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)">Band 3 Block=128x128 Type=Byte, ColorInterp=Blue<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)">The math would be:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)">126015*3*8=3024360 bytes<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)">            3024360/1024= 2,954 KB<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)">Or:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)">126015*3*8*128*128=4E10 bytes<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:36pt"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)">4E10/1024/1024= 3,8147 MB<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)">?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)">-Matt<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
</div>
</div>
</div>

</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Darafei "Komяpa" Praliaskouski<br>OSM BY Team - <a href="http://openstreetmap.by/" target="_blank">http://openstreetmap.by/</a><br></div></div>