Memory error, rasterio merge
I tried to merge/stitch my 1000 geotif images, each of around 4gb using rasterio.
files = glob.glob('*.tif')
src_files = 
for fi in files:
src = rasterio.open(fi)
mosaic, out_trans = merge(src_files)
out_meta = src.meta.copy()
with rasterio.open(fo, "w", **out_meta) as dest:
Unfortunately, I could not proceed with the Memory error.
I could merge/stitch them using gdal translate, though it was very slow. So, physical memory should not be problem. To speed up, I tried rasterio, but did not work. Any help to make it possible would be appreciated.
On Wed, Jan 29, 2020 at 7:29 AM Simon via Groups.Io <email@example.com> wrote:
Rasterio's merge function is not well optimized with respect to memory. An output array is allocated such that it covers all the inputs. If your inputs don't overlap, this could be 4TB or more, which probably exceeds the available memory on your computer.