Ticket #2950 (closed defect: fixed)
gdal_merge.py error (Out of range band requested: 2)
| Reported by: | alobo | Owned by: | rouault |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.7.0 |
| Component: | Utilities | Version: | unspecified |
| Severity: | normal | Keywords: | |
| Cc: |
Description
I run gdal_merge.py (from FWTools-2.0.6) and get:
$ /usr/local/FWTools-2.0.6/bin_safe/gdal_merge.py -v -o PICT0126radcorr.tif -separate PICT0126Nradcorr.tif PICT0126Rradcorr.tif PICT0126Gradcorr.tif
Filename: PICT0126Nradcorr.tif File Size: 2560x1920x1 Pixel Size: 1.000000 x 1.000000 UL:(0.000000,0.000000) LR:(2560.000000,1920.000000) Copy 0,0,2560,1920 to 0,0,2560,1920.
Filename: PICT0126Rradcorr.tif File Size: 2560x1920x1 Pixel Size: 1.000000 x 1.000000 UL:(0.000000,0.000000) LR:(2560.000000,1920.000000) Copy 0,0,2560,1920 to 0,0,2560,1920. Traceback (most recent call last):
File "/usr/local/FWTools-2.0.6/bin/gdal_merge.py", line 505, in ?
fi.copy_into( t_fh, 1, t_band, nodata )
File "/usr/local/FWTools-2.0.6/bin/gdal_merge.py", line 303, in copy_into
nodata_arg )
File "/usr/local/FWTools-2.0.6/bin/gdal_merge.py", line 133, in raster_copy
t_band = t_fh.GetRasterBand?( t_band_n )
File "/usr/local/FWTools-2.0.6/pymod/gdal.py", line 648, in GetRasterBand?
raise ValueError?, 'Out of range band requested: %d' % i
ValueError?: Out of range band requested: 2
