<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body>
<div dir="auto">Hi,</div>
<div dir="auto"><br>
</div>
<div dir="auto">The raster <span style="color:rgb(0, 0, 0);background-color:rgb(255, 255, 255);display:inline !important">one </span>is the world, the second is the UK.</div>
<div dir="auto">The UK fits within the first raster...</div>
<div dir="auto" style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<br>
</div>
<div dir="auto" style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
We want to update UK data in raster one.</div>
<div dir="auto" style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<br>
</div>
<div dir="auto" style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
Regards,</div>
<div dir="auto" style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<br>
</div>
<div dir="auto" style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
Clive</div>
<div><br>
</div>
<div id="ms-outlook-mobile-signature" dir="auto">Get <a href="https://aka.ms/AAb9ysg">
Outlook for Android</a></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Rahkonen Jukka <jukka.rahkonen@maanmittauslaitos.fi><br>
<b>Sent:</b> Monday, December 5, 2022 11:34:53 AM<br>
<b>To:</b> Clive Swan <cliveswan@gmail.com>; gdal-dev@lists.osgeo.org <gdal-dev@lists.osgeo.org><br>
<b>Subject:</b> Re: [gdal-dev] gdal_merge</font>
<div> </div>
</div>
<style>
<!--
@font-face
        {font-family:"Cambria Math"}
@font-face
        {font-family:Calibri}
@font-face
        {font-family:Menlo}
p.x_MsoNormal, li.x_MsoNormal, div.x_MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif}
p.x_gmail-p1, li.x_gmail-p1, div.x_gmail-p1
        {margin-right:0cm;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif}
span.x_gmail-s1
        {}
span.x_Shkpostityyli21
        {font-family:"Calibri",sans-serif;
        color:windowtext}
.x_MsoChpDefault
        {font-family:"Calibri",sans-serif}
@page WordSection1
        {margin:70.85pt 2.0cm 70.85pt 2.0cm}
div.x_WordSection1
        {}
-->
</style>
<div lang="FI" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="x_WordSection1">
<p class="x_MsoNormal"><span style="">Hi,</span></p>
<p class="x_MsoNormal"><span style=""> </span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="">Maybe your rasters are far apart. Gdal_merge creates a raster with so large extent that all the source images fit within it. Even empty pixels take space.</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style=""> </span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="">-Jukka Rahkonen-</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style=""> </span></p>
<p class="x_MsoNormal"><span lang="EN-US" style=""> </span></p>
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0cm 0cm 0cm">
<p class="x_MsoNormal"><b>Lähettäjä:</b> gdal-dev <gdal-dev-bounces@lists.osgeo.org>
<b>Puolesta </b>Clive Swan<br>
<b>Lähetetty:</b> maanantai 5. joulukuuta 2022 12.24<br>
<b>Vastaanottaja:</b> gdal-dev@lists.osgeo.org<br>
<b>Aihe:</b> [gdal-dev] gdal_merge</p>
</div>
<p class="x_MsoNormal"> </p>
<div>
<p class="x_MsoNormal">Hi Even,</p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal">Thanks <br>
the –configuration sorted out that issue.</p>
<p class="x_MsoNormal"><span style="font-size:10.0pt; font-family:"Courier New"">CPL_VSIL_USE_TEMP_FILE_FOR_RANDOM_WRITE is a configuration option /
</span></p>
<p class="x_MsoNormal"><span style="font-size:10.0pt; font-family:"Courier New"">environment variable, so you have to pass it with --config
</span></p>
<p class="x_MsoNormal"><span style="font-size:10.0pt; font-family:"Courier New"">CPL_VSIL_USE_TEMP_FILE_FOR_RANDOM_WRITE YES</span></p>
<p class="x_MsoNormal"><br>
<br>
Now I am getting a memory issue?? << The input files are 6.9 GB + 672 MB<br>
The output should be 7.xx GB</p>
<p class="x_MsoNormal"> </p>
<p class="x_gmail-p1" style="margin-right:0cm; margin-bottom:0cm; margin-left:21.7pt">
<span class="x_gmail-s1"><span style="font-size:9.0pt; font-family:"Menlo",serif; color:purple">6.9 GB + 672MB</span></span><span style="font-size:9.0pt; font-family:"Menlo",serif; color:purple"></span></p>
<p class="x_gmail-p1" style="margin-right:0cm; margin-bottom:0cm; margin-left:21.7pt">
<span class="x_gmail-s1"><span style="font-size:9.0pt; font-family:"Menlo",serif; color:purple">numpy.core._exceptions._ArrayMemoryError: Unable to allocate 377. GiB for an array with shape (225000, 450000) and data type float32</span></span><span style="font-size:9.0pt; font-family:"Menlo",serif; color:purple"></span></p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal" style="margin-bottom:12.0pt">Any suggestions appreciated</p>
<p class="x_MsoNormal">Kind regards,</p>
<p class="x_MsoNormal">Clive</p>
<p class="x_MsoNormal"><br clear="all">
<br>
-- </p>
<div>
<div>
<div>
<div>
<div>
<div>
<p style="margin:0cm"><span style="font-size:8.0pt"> Regards,</span></p>
<p style="margin:0cm"> </p>
<p style="margin:0cm"><span style="font-size:8.0pt">Clive Swan</span></p>
<p style="margin:0cm"><span style="font-size:12.0pt">--</span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>