WCS raster output black & white on ECW
Bart van den Eijnden (OSGIS)
bartvde at XS4ALL.NL
Fri May 19 05:32:53 PDT 2006
Just found out after many hours that this is caused by having OWS_EXTENT
METADATA. If I comment out the OWS_EXTENT metadata, I get the coverage in
colour.
Frank, any ideas what could cause this?
LAYER
METADATA
"WMS_LAYER_GROUP" "/LUCHTFOTO/DIGITAAL KLEUREN LUCHTFOTOGRAFIE"
"OWS_TITLE" "Luchtfoto 2005"
"OWS_ABSTRACT" "Luchtfoto 2005"
#"OWS_EXTENT" "10000 305000 280000 619000"
"WMS_METADATAURL_TYPE" "TC211"
"WMS_METADATAURL_FORMAT" "text/xml"
"WMS_METADATAURL_HREF"
"http://145.50.148.28/geoservices/widgets/GeoservicesCatalogSearch/WCASWrapper.php?WCASURL=http://145.50.148.28:8082/deegreewcas/wcas&FILEIDENTIFIER=AAA216"
"WFS_MAXFEATURES" "50"
"WCS_LABEL" "Digitale Kleuren Luchtfoto's Nederland.
Landsdekkende fotografie van Nederland."
"WCS_RANGESET_NAME" "Luchtfoto's"
"WCS_RANGESET_LABEL" "Luchtfoto's"
"WCS_FORMATS" "GEOTIFF,ECW,MRSID"
"WCS_RESOLUTION" "0.4 0.4"
"WCS_SIZE" "690000 800000"
"GML_INCLUDE_ITEMS" "all"
"GML_EXCLUDE_ITEMS" "class"
END
PROJECTION
"init=epsg:28992"
END
NAME "AAA216" # zie basispakket.mdb, ISO19115
DATA "aerogrid_nl2005/Aerogrid_NL2005_40cm.ecw"
STATUS ON
DUMP TRUE
TYPE RASTER
UNITS METERS
MAXSCALE 150000
END
Best regards,
Bart
> In addition, this is the output when CPL_DEBUG is ON:
>
> [Fri May 19 09:05:44 2006] [error] [client 145.50.90.64] ECW:
> NCScbmOpenFileView(/data/geopakhuis/aerogrid_nl2005/Aerogrid_NL2005_40cm.ecw):
> eErr = 0
> [Fri May 19 09:05:44 2006] [error] [client 145.50.90.64] ECW: FileInfo:
> SizeXY=690000,800000 Bands=3
> [Fri May 19 09:05:44 2006] [error] [client 145.50.90.64]
> OriginXY=8000,624000 CellIncrementXY=0.4,-0.4
> [Fri May 19 09:05:44 2006] [error] [client 145.50.90.64]
> [Fri May 19 09:05:44 2006] [error] [client 145.50.90.64] ECW:
> projection=LOCAL, datum=WGS84
> [Fri May 19 09:05:44 2006] [error] [client 145.50.90.64] GDAL:
> GDALOpen(/data/geopakhuis/aerogrid_nl2005/Aerogrid_NL2005_40cm.ecw)
> succeeds as ECW.
> [Fri May 19 09:05:44 2006] [error] [client 145.50.90.64]
> [Fri May 19 09:05:44 2006] [error] [client 145.50.90.64] ECWRasterBand:
> RasterIO(nXOff=443174,nYOff=749014,nXSize=1254,nYSize=751 -> 1252x750)
> [Fri May 19 09:05:45 2006] [error] [client 145.50.90.64] GDAL:
> GDALClose(/data/geopakhuis/aerogrid_nl2005/Aerogrid_NL2005_40cm.ecw)
> [Fri May 19 09:05:45 2006] [error] [client 145.50.90.64]
> [Fri May 19 09:05:45 2006] [error] [client 145.50.90.64] GDAL:
> GDALDriver::Create(MEM,msSaveImageGDAL_temp,1252,750,4,Byte,(nil))
> [Fri May 19 09:05:45 2006] [error] [client 145.50.90.64] ECW:
> GetGDTProjDat(28992) = NUTM31/RD
> [Fri May 19 09:05:45 2006] [error] [client 145.50.90.64] ECW: Writing with
> PROJ=NUTM31, DATUM=RD
> [Fri May 19 09:06:00 2006] [error] [client 145.50.90.64] ECW:
> NCScbmOpenFileView(/data/OGC_UMN_services/tmp/ms_tmp/114802234574260.ecw):
> eErr = 0
> [Fri May 19 09:06:00 2006] [error] [client 145.50.90.64] ECW: FileInfo:
> SizeXY=1252,750 Bands=4
> [Fri May 19 09:06:00 2006] [error] [client 145.50.90.64]
> OriginXY=185270,324394 CellIncrementXY=0.40016,-0.4
> [Fri May 19 09:06:00 2006] [error] [client 145.50.90.64]
> [Fri May 19 09:06:00 2006] [error] [client 145.50.90.64] ECW:
> projection=NUTM31, datum=RD
> [Fri May 19 09:06:00 2006] [error] [client 145.50.90.64] GDAL:
> GDALOpen(/data/OGC_UMN_services/tmp/ms_tmp/114802234574260.ecw) succeeds
> as ECW.
> [Fri May 19 09:06:00 2006] [error] [client 145.50.90.64]
> [Fri May 19 09:06:00 2006] [error] [client 145.50.90.64] GDAL:
> GDALClose(msSaveImageGDAL_temp)
> [Fri May 19 09:06:00 2006] [error] [client 145.50.90.64]
> [Fri May 19 09:06:00 2006] [error] [client 145.50.90.64] GDAL:
> GDALClose(/data/OGC_UMN_services/tmp/ms_tmp/114802234574260.ecw)
> [Fri May 19 09:06:00 2006] [error] [client 145.50.90.64]
> [Fri May 19 09:06:00 2006] [error] [client 145.50.90.64] GDAL:
> GDALDeregister_GTiff() called.
>
> Best regards,
> Bart
>
>> 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