I'm also having problems with running gdal_merge.py within another python script and I cannot run it. I already checked a similar problem here. My example is as follows:
First I set my workspace and locations:
sys.path.append('C:/Python27/ArcGIS10.2/Scripts/') import gdal_merge as gm workspace="D:/Satellitendaten/rapideye/img/testregion/cannyedge/out/" os.chdir(workspace)
Then I run:
sys.argv = ['o', 'out.tif', 'allre1.tif', 'allre10.tif', 'allre11.tif', 'allre12.tif', 'allre13.tif', 'allre14.tif', 'allre15.tif', 'allre16.tif', 'allre17.tif', 'allre18.tif', 'allre2.tif', 'allre3.tif', 'allre4.tif', 'allre5.tif', 'allre6.tif', 'allre7.tif', 'allre8.tif', 'allre9.tif']
0...10...20...30...40...50...60...70...80...90...100 - done.
But also ERROR 4:
`out.tif' does not exist in the file system, and is not recognised as a supported dataset name.
So the output is not created. Maybe someone can help me out with the issue to merge different tif files to a single tif?