<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:3.0cm 2.0cm 3.0cm 2.0cm;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=DA link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal>Hi all,<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><span lang=EN-US>I'm having problems with the color
interpretation of the output from GDAL utilities. I have some 4 band (Red,
Green, Blue, Near infrared) rasters. The fourth band is interpreted as
"Undefined" by GDAL, but GDAL insists on marking the fourth band as ALPHA
in the output. Having the fourth band marked as ALPHA causes a bunch of
problems with other software, so I would really like the GDAL tools to leave it
as "Undefined". Is this possible?<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Please find a simple example below where gdal_translate
marks fourth band as ALPHA.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Best regards<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Asger<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Example:<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>c:\>gdalinfo --version<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>GDAL 1.6.0dev, FWTools 2.2.6, released
2008/08/22<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>c:\>gdalinfo 2km.tif<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Warning 1: TIFFFetchNormalTag:Incompatible
type for "RichTIFFIPTC"; tag ignored<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Driver: GTiff/GeoTIFF<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Files: 2km.tif<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Size is 10000, 10000<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Coordinate System is `'<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Origin = (580000.000000000000000,6330000.000000000000000)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Pixel Size =
(0.200000000000000,-0.200000000000000)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Metadata:<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> TIFFTAG_SOFTWARE=Adobe Photoshop CS4
Windows<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> TIFFTAG_DATETIME=2008:12:09 17:27:10<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> TIFFTAG_XRESOLUTION=72<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> TIFFTAG_YRESOLUTION=72<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> TIFFTAG_RESOLUTIONUNIT=2
(pixels/inch)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Image Structure Metadata:<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> INTERLEAVE=PIXEL<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Corner Coordinates:<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Upper Left ( 580000.000,
6330000.000)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Lower Left ( 580000.000,
6328000.000)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Upper Right ( 582000.000,
6330000.000)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Lower Right ( 582000.000,
6328000.000)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Center
( 581000.000, 6329000.000)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Band 1 Block=10000x1 Type=Byte,
ColorInterp=Red<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Band 2 Block=10000x1 Type=Byte,
ColorInterp=Green<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Band 3 Block=10000x1 Type=Byte,
ColorInterp=Blue<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Band 4 Block=10000x1 Type=Byte,
ColorInterp=Undefined<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>c:\>gdal_translate 2km.tif out.tif<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Warning 1: TIFFFetchNormalTag:Incompatible
type for "RichTIFFIPTC"; tag ignored<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Input file size is 10000, 10000<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>0...10...20...30...40...50...60...70...80...90...100
- done.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>c:\>gdalinfo out.tif<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Driver: GTiff/GeoTIFF<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Files: out.tif<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Size is 10000, 10000<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Coordinate System is `'<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Origin =
(580000.000000000000000,6330000.000000000000000)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Pixel Size =
(0.200000000000000,-0.200000000000000)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Metadata:<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> TIFFTAG_SOFTWARE=Adobe Photoshop CS4
Windows<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> TIFFTAG_DATETIME=2008:12:09 17:27:10<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> TIFFTAG_XRESOLUTION=72<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> TIFFTAG_YRESOLUTION=72<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> TIFFTAG_RESOLUTIONUNIT=2
(pixels/inch)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Image Structure Metadata:<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> INTERLEAVE=PIXEL<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Corner Coordinates:<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Upper Left ( 580000.000,
6330000.000)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Lower Left ( 580000.000,
6328000.000)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Upper Right ( 582000.000,
6330000.000)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Lower Right ( 582000.000,
6328000.000)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Center
( 581000.000, 6329000.000)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Band 1 Block=10000x1 Type=Byte,
ColorInterp=Red<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> Mask Flags: PER_DATASET ALPHA<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Band 2 Block=10000x1 Type=Byte,
ColorInterp=Green<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> Mask Flags: PER_DATASET ALPHA<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Band 3 Block=10000x1 Type=Byte,
ColorInterp=Blue<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> Mask Flags: PER_DATASET ALPHA<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Band 4 Block=10000x1 Type=Byte,
ColorInterp=Alpha<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
</div>
</body>
</html>