I'm working with QGIS 1.8 (gdal 1.9.2) and GRASS 6.4.3...but on Windows 7.
I "just" want to merge my raster.
I've got a folder with 50 GTiff raster from Lidar data.
The aim is to merge raster before or after an import into GRASS in order to do some contours...
Before GRASS, I tried gdal_merge with QGIS's gui, without any option. I had an error message : "permission denied".
So I tried it in GRASS with r.patch but : First the gui don't allows you to select multiple raster at one time...
Then I don't know how to batch with GRASS functions in Windows...I tried the GRASS command line but can't locate in the current mapset (didn't understand how). When I had the windows installer for QGIS, this commandline putted you in the current mapset but it's not the case with the basic installation of QGIS.
I'm quite locked...Any help ?
1 Answer 1
- Open
MSYS
(It should have been downloaded along if you used OSGeo4W utility to install qgis) cd
(Change Directory) to your folder with your data.cd c:/(path to)/(my data)/
(Hint: pressing tab, autocompletes)
- one-line it:
gdal_merge.py -o out.tif $(ls *.tif)
out.tif
-> is your output file, name it to whatever you want.$(ls *.tif)
-> lists all the files ending with tif, and parses it at a parameter to gdal_merge. Change it as needed.
you can explore more options of gdal_merge.py at the relevant page.
-
Thank you for the tip but MSYS doesn't work. When I try to open it, I have on error message : "Window doesn't find C:\Program. Check the name and try again". I didn't installed QGIS with the advance OSGeo4w installer because I definitely want use GRASS inside QGIS.Samy-DT– Samy-DT2013年07月28日 15:19:30 +00:00Commented Jul 28, 2013 at 15:19
-
1MSYS has problems with blanks in pathnames. The OSGEO4W shell should overcome this problem. You can run GDAL commands inside it in the same way.AndreJ– AndreJ2014年01月28日 12:43:16 +00:00Commented Jan 28, 2014 at 12:43
Explore related questions
See similar questions with these tags.