Is there any open source option in python to mosaic rasters to one raster? The equivalent of the MosaicToNewRaster_management in ArcGIS.

  • Yes, you can do it with python imaging library or its successor. Open an output image in memory, write chunks to it. Google plus a bit of hacking is your friend here. Feb 23, 2016 at 16:32

2 Answers 2


In Python use

In the shell, use all the GDAL commands (as Camargo says)


In shell, use GDAL merge

% gdal_merge.py -init 255 -o out.tif in1.tif in2.tif

In Python

import subprocess
subprocess.call("gdal_merge.py -init 255 -o out.tif in1.tif in2.tif")

More info at: http://www.gdal.org/gdal_merge.html


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.