[gdal-dev] feeding input files into gdal_merge.py

2014-07-09 Thread bas smit
While merging the files using gdal_merge.py the following code works: subprocess.call([sys.executable,gmerge,'-o','C:\\r.tif','-of','GTiff','D:\\a.tif','D:\\b.tif'],shell=True) However, when the input files are numerous, each file can not be inserted separately. In this case, the following code

Re: [gdal-dev] feeding input files into gdal_merge.py

2014-07-09 Thread Etienne Tourigny
this is not really related to gdal but to python... you should try using shell=False and adding the entire command in one argument instead of an array, but I'm not sure that the file globbing (*.tif) would work. On Wed, Jul 9, 2014 at 12:31 PM, bas smit baspys...@gmail.com wrote: While merging

Re: [gdal-dev] feeding input files into gdal_merge.py

2014-07-09 Thread Luke
Try: import glob tifs=glob.glob('D:/*.tif') subprocess.call([sys.executable,gmerge,'-o','C:/r.tif','-of','GTiff']+tifs) Luke -- View this message in context: http://osgeo-org.1560.x6.nabble.com/gdal-dev-feeding-input-files-into-gdal-merge-py-tp5150332p5150377.html Sent from the GDAL - Dev