<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>You may need to specify the pixel size with the -ps argument to
      be the one with the less resolution.</p>
    <p>Or try using gdalwarp instead (you may also need to use the -tr
      argument to specify the resolution). gdal_merge cannot deal with
      rasters larger than memory.<br>
    </p>
    <div class="moz-cite-prefix">Le 05/12/2022 à 12:46, Clive Swan a
      écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CWXP123MB39598752820997674CC7529DA0189@CWXP123MB3959.GBRP123.PROD.OUTLOOK.COM">
      <div dir="auto">Hi,</div>
      <div dir="auto"><br>
      </div>
      <div dir="auto">The raster <span>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">
        <br>
      </div>
      <div dir="auto">
        We want to update UK data in raster one.</div>
      <div dir="auto">
        <br>
      </div>
      <div dir="auto">
        Regards,</div>
      <div dir="auto">
        <br>
      </div>
      <div dir="auto">
        Clive</div>
      <div><br>
      </div>
      <div id="ms-outlook-mobile-signature" dir="auto">Get <a
          href="https://aka.ms/AAb9ysg" moz-do-not-send="true">
          Outlook for Android</a></div>
      <hr tabindex="-1">
      <div id="divRplyFwdMsg" dir="ltr"><b>From:</b> Rahkonen Jukka
        <a class="moz-txt-link-rfc2396E" href="mailto:jukka.rahkonen@maanmittauslaitos.fi"><jukka.rahkonen@maanmittauslaitos.fi></a><br>
        <b>Sent:</b> Monday, December 5, 2022 11:34:53 AM<br>
        <b>To:</b> Clive Swan <a class="moz-txt-link-rfc2396E" href="mailto:cliveswan@gmail.com"><cliveswan@gmail.com></a>;
        <a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a> <a class="moz-txt-link-rfc2396E" href="mailto:gdal-dev@lists.osgeo.org"><gdal-dev@lists.osgeo.org></a><br>
        <b>Subject:</b> Re: [gdal-dev] gdal_merge
        <div> </div>
      </div>
      <div lang="FI">
        <div class="x_WordSection1">
          <p class="x_MsoNormal"><span>Hi,</span></p>
          <p class="x_MsoNormal"><span> </span></p>
          <p class="x_MsoNormal"><span lang="EN-US">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"> </span></p>
          <p class="x_MsoNormal"><span lang="EN-US">-Jukka Rahkonen-</span></p>
          <p class="x_MsoNormal"><span lang="EN-US"> </span></p>
          <p class="x_MsoNormal"><span lang="EN-US"> </span></p>
          <div>
            <p class="x_MsoNormal"><b>Lähettäjä:</b> gdal-dev
              <a class="moz-txt-link-rfc2396E" href="mailto:gdal-dev-bounces@lists.osgeo.org"><gdal-dev-bounces@lists.osgeo.org></a>
              <b>Puolesta </b>Clive Swan<br>
              <b>Lähetetty:</b> maanantai 5. joulukuuta 2022 12.24<br>
              <b>Vastaanottaja:</b> <a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><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>CPL_VSIL_USE_TEMP_FILE_FOR_RANDOM_WRITE
                is a configuration option /
              </span></p>
            <p class="x_MsoNormal"><span>environment variable, so you
                have to pass it with --config
              </span></p>
            <p class="x_MsoNormal"><span>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">
              <span class="x_gmail-s1"><span>6.9 GB + 672MB</span></span><span></span></p>
            <p class="x_gmail-p1">
              <span class="x_gmail-s1"><span>numpy.core._exceptions._ArrayMemoryError:
                  Unable to allocate 377. GiB for an array with shape
                  (225000, 450000) and data type float32</span></span><span></span></p>
            <p class="x_MsoNormal"> </p>
            <p class="x_MsoNormal">Any suggestions appreciated</p>
            <p class="x_MsoNormal">Kind regards,</p>
            <p class="x_MsoNormal">Clive</p>
            <p class="x_MsoNormal"><br>
              <br>
              -- </p>
            <div>
              <div>
                <div>
                  <div>
                    <div>
                      <div>
                        <p><span> Regards,</span></p>
                        <p> </p>
                        <p><span>Clive Swan</span></p>
                        <p><span>--</span></p>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></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>