WCS raster output black & white on ECW

Bart van den Eijnden (OSGIS) bartvde at XS4ALL.NL
Fri May 19 02:51:45 EDT 2006


Hi list,

using Mapserver 4.8.3, GDAL 1.3.2 final and the latest ECW SDK we are
running into a strange issue. This is on Red Hat Enterprise 3.

We use Mapserver WCS to output rasters in ECW, Geotiff and MrSID format.
If we use a Geotiff as a source, all output from Mapserver WCS is okay. If
we use an aerial photo in ECW format as input, all output (ECW, MrSID as
well as Geotiff) comes out black and white instead of colour. WMS output
is just fine. Any ideas what could be causing this?

Btw, a direct gdal_translate works fine and outputs in colour:

[root at poseidon gdelivery]# gdal_translate -of "Gtiff" -projwin 185269.9
324394.4 185771.2 324093.7
/data/geopakhuis/aerogrid_nl2005/Aerogrid_NL2005_40cm.ecw
/tmp/testbart.tif
Input file size is 690000, 800000
Computed -srcwin 443174 749014 1253 752 from projected window.
0...10...20...30...40...50...60...70...80...90...100 - done.

These are the output formats used:

  OUTPUTFORMAT
    NAME "GEOTIFF"
    DRIVER "GDAL/GTiff"
    MIMETYPE "image/tiff"
    IMAGEMODE "RGBA"
    EXTENSION "tif"
    FORMATOPTION "COMPRESS=PACKBITS"
  END

  OUTPUTFORMAT
    NAME "ECW"
    DRIVER "GDAL/ECW"
    MIMETYPE "image/ecw"
    IMAGEMODE "RGBA"
    EXTENSION "ecw"
  END

  OUTPUTFORMAT
    NAME "MrSID"
    DRIVER "GDAL/MrSID"
    MIMETYPE "image/mrsid"
    IMAGEMODE "RGBA"
    EXTENSION "sid"
  END

This is the gdalinfo output from the source ECW file:

[root at poseidon gdelivery]# gdalinfo
/data/geopakhuis/aerogrid_nl2005/Aerogrid_NL2005_40cm.ecw
Driver: ECW/ERMapper Compressed Wavelets
Size is 690000, 800000
Coordinate System is:
LOCAL_CS["LOCAL",
    UNIT["Meter",1]]
Origin = (8000.000000,624000.200000)
Pixel Size = (0.40000000,-0.40000000)
Corner Coordinates:
Upper Left  (    8000.000,  624000.200)
Lower Left  (    8000.000,  304000.200)
Upper Right (  284000.000,  624000.200)
Lower Right (  284000.000,  304000.200)
Center      (  146000.000,  464000.200)
Band 1 Block=690000x1 Type=Byte, ColorInterp=Red
  Overviews: arbitrary
Band 2 Block=690000x1 Type=Byte, ColorInterp=Green
  Overviews: arbitrary
Band 3 Block=690000x1 Type=Byte, ColorInterp=Blue
  Overviews: arbitrary

Thanks in advance.

Best regards,
Bart



More information about the mapserver-users mailing list