<div dir="ltr">/data/coastal.tif should be 6.9GB<br><div><br></div><div>I get weird output from gdal_merge??<br></div><br>gdal_merge.py -o /data/coastal.tif -n -9999 -co BIGTIFF=YES -co COMPRESS=LZW -co BLOCKXSIZE=128 -co BLOCKYSIZE=128 -co NUM_THREADS=ALL_CPUS --config CPL_VSIL_USE_TEMP_FILE_FOR_RANDOM_WRITE YES --config GDAL_SWATH_SIZE 1000000 /vsis3/summer/1/coastal.tif /vsis3/summer/2/coastal.tif & disown -h<br>[1] 507311<br>ubuntu@ip-172-31-31-16:~$ 0Traceback (most recent call last):<br> File "/usr/bin/gdal_merge.py", line 11, in <module><br> sys.exit(main(sys.argv))<br> File "/usr/lib/python3/dist-packages/osgeo_utils/gdal_merge.py", line 530, in main<br> fi.copy_into(t_fh, band, band, nodata, verbose)<br> File "/usr/lib/python3/dist-packages/osgeo_utils/gdal_merge.py", line 284, in copy_into<br> return raster_copy(s_fh, sw_xoff, sw_yoff, sw_xsize, sw_ysize, s_band,<br> File "/usr/lib/python3/dist-packages/osgeo_utils/gdal_merge.py", line 56, in raster_copy<br> return raster_copy_with_nodata(<br> File "/usr/lib/python3/dist-packages/osgeo_utils/gdal_merge.py", line 96, in raster_copy_with_nodata<br> data_src = s_band.ReadAsArray(s_xoff, s_yoff, s_xsize, s_ysize,<br> File "/usr/lib/python3/dist-packages/osgeo/gdal.py", line 3653, in ReadAsArray<br> return gdal_array.BandReadAsArray(self, xoff, yoff,<br> File "/usr/lib/python3/dist-packages/osgeo/gdal_array.py", line 422, in BandReadAsArray<br> buf_obj = numpy.empty([buf_ysize, buf_xsize], dtype=typecode)<br>numpy.core._exceptions._ArrayMemoryError: Unable to allocate 377. GiB for an array with shape (225000, 450000) and data type float32<br><br><br>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><p style="margin:0cm 0cm 0pt"><span style="font-family:Calibri;font-size:8pt"> Regards,</span></p><p style="margin:0cm 0cm 0pt"><span style="font-family:Calibri;font-size:8pt"><br></span></p><p style="margin:0cm 0cm 0pt"><span style="font-family:Calibri;font-size:8pt">Clive Swan</span></p>
<p style="margin:0cm 0cm 0pt"><span><font size="3"><font face="Calibri">--</font></font></span></p></div></div></div></div></div></div></div>