Opened 12 years ago
Closed 10 years ago
#4234 closed defect (fixed)
Problem with ECW files in MapServer using PROCESSING "BANDS=..."
Reported by: | armin | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.10.0 |
Component: | GDAL_Raster | Version: | unspecified |
Severity: | normal | Keywords: | ECW |
Cc: |
Description
I noticed a strange behaviour of Mapserver (5.6.7 and 6.0.1) when defining for a raster layer based on an ECW file a processing parameter for the bands order like
PROCESSING "BANDS=3,2,1"
The order of the bands does not have any effect. The image is always displayed in the original band order 1,2,3, whatever I define for the BANDS value. If I just define a single band, like "BANDS=3" or "BANDS=1" then it's displaying it correctly using the right band.
This problem seems just to appear for ECW files, not e.g. for Tiff files. If I wrap a VRT image around the ECW and use this VRT in the DATA tag of the map file then the BANDS order is taken into account, just not when defining the DATA using the pure ECW file.
The problem appears both with GDAL 1.8 and trunk-2011-09-04.
Comment from Frank Warmerdam on Mapserver mailing list: "I suspect that the special interleaved read method in the GDAL ECW driver is not properly honouring the list of bands passed in to it"
Change History (6)
comment:1 by , 12 years ago
Component: | default → GDAL_Raster |
---|---|
Keywords: | ECW added |
Status: | new → assigned |
comment:2 by , 12 years ago
comment:3 by , 12 years ago
I have tracked down into ECWDataset::IRasterIO() and the band list is being passed into poFileView->SetView(). As far as I can tell it is having no effect. Note, I am testing with the 3.3 library. I haven't tested it with more recent versions which might be illuminating.
comment:5 by , 12 years ago
I have tested Frank's script with SDK 4.2 and it works as expected (the order of bands specified is taken into account), so it looks like a defect of the SDK 3.3
comment:6 by , 10 years ago
Milestone: | → 2.0.0 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
I have confirmed that the following script produces the same result whether the source band list is [3,2,1] or [1,2,3].