<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Clive,</p>
    <p>CPL_VSIL_USE_TEMP_FILE_FOR_RANDOM_WRITE is a configuration option
      / environment variable, so you have to pass it with --config
      CPL_VSIL_USE_TEMP_FILE_FOR_RANDOM_WRITE YES</p>
    <p>Even<br>
    </p>
    <div class="moz-cite-prefix">Le 29/11/2022 à 20:12, Clive Swan a
      écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CA+kQ3mtX4z=U_U-qKNf8idH6yDSW2YqSna=bZH_tVPT=4JDcyA@mail.gmail.com">
      <div dir="ltr">
        <div>
          <div>Greetings,<br>
            <br>
          </div>
          I am trying to select band 1 and then use gdal_merge to merge
          two tiff files in an AWS bucket.<br>
        </div>
        Getting odd errors.<br>
        <br>
        gdal_merge.py -o
/vsis3/summer-outputs/3_dataupdated/rcp26-2020-coastal_flood-NA-false.tif
/vsis3/summer-outputs/3_data_ready_for_spectra/coastal-undefended-rcp26-2020.tif
             
 /vsis3/summer-outputs/5_UK_prod_rasters/coastal-undefended-rcp26-2020.tif
         -of GTiff  -co -b 1  -co
        CPL_VSIL_USE_TEMP_FILE_FOR_RANDOM_WRITE=YES -co
        NUM_THREADS=ALL_CPUS --config AWS_ACCESS_KEY_ID KEY_ID --config
        AWS_SECRET_ACCESS_KEY ACCESS_KEY<br>
        <br>
        ERRORS<br>
          `1' not recognized as a supported file
format.                                                                                                                                 
        << band 1<br>
        Warning 6: creation option '-b' is not formatted with the
        key=value
format                                                                                       
        << band 1<br>
        Warning 6: <b>driver GTiff does not support creation option </b>CPL_VSIL_USE_TEMP_FILE_FOR_RANDOM_WRITE                 
        << Get an error if leave this out<br>
        ERROR 1: <b>w+ not supported for /vsis3, unless</b>
        CPL_VSIL_USE_TEMP_FILE_FOR_RANDOM_WRITE is set to
        YES             << Get an error<br>
        ERROR 4: Attempt to create new tiff file
`/vsis3/summer-outputs/3_data_ready/updated/rcp26-2020-coastal_flood-NA-false.tif'
        failed: <b>Permission denied  << </b>added the security
        key, etc<br>
        <b>Creation failed, terminating gdal_merge.</b>
        <div>
          <div>
            <div><br>
              -- <br>
              <div dir="ltr" class="gmail_signature"
                data-smartmail="gmail_signature">
                <div dir="ltr">
                  <div>
                    <div dir="ltr">
                      <div>
                        <div dir="ltr">
                          <p><span> Regards,</span></p>
                          <p><span><br>
                            </span></p>
                          <p><span>Clive Swan</span></p>
                          <p><span>--</span></p>
                          <p><br>
                          </p>
                        </div>
                      </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>