<html><div style='background-color:'><DIV class=RTE>
<P>Hello Frank,</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; That did it, thank you very much. I do not actually use ArcView or ArcGIS reader but obviously something simplistic since it cannot read the band interleaved, only pixel interleaved.</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I have another question, which is more general and not only on my behalf but also on Peter Lenson's, I am working as undergraduate student in GeoICT lab which is related to GeoTango. The question is whether there is a C++ version of the python merge program, i.e. gdal_merge.py from pymod directory under GDAL?</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Thank you again.</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Ilya S.</P></DIV>
<DIV></DIV>&gt;From: Frank Warmerdam &lt;fwarmerdam@gmail.com&gt;
<DIV></DIV>&gt;Reply-To: warmerdam@pobox.com
<DIV></DIV>&gt;To: Ilya Serebrianik &lt;predator2448@hotmail.com&gt;
<DIV></DIV>&gt;CC: gdal-dev@xserve.flids.com
<DIV></DIV>&gt;Subject: Re: [Gdal-dev] Warping GeoTIFF colour image - beginner question(s)
<DIV></DIV>&gt;Date: Mon, 2 May 2005 15:27:06 -0400
<DIV></DIV>&gt;
<DIV></DIV>&gt;On 5/2/05, Ilya Serebrianik &lt;predator2448@hotmail.com&gt; wrote:
<DIV></DIV>&gt; &gt; I also tried using the precompiled tools from the GDAL website, specifically
<DIV></DIV>&gt; &gt; the warp tool and it also produces the squished effect. Perhaps the GeoTIFF
<DIV></DIV>&gt; &gt; I am using as a source is special in some sense and needs to be processed in
<DIV></DIV>&gt; &gt; a special way, I am not sure. Here is the information extracted using
<DIV></DIV>&gt; &gt; gdalinfo.exe about the image, it is around 75 MB:
<DIV></DIV>&gt;
<DIV></DIV>&gt;Ilya,
<DIV></DIV>&gt;
<DIV></DIV>&gt;A light bulb just went off for me.&nbsp;&nbsp;I am willing to bet you are using a
<DIV></DIV>&gt;simplistic GeoTIFF reader - perhaps ArcView or ArcGIS?&nbsp;&nbsp;Many tools
<DIV></DIV>&gt;have trouble reading multi-band TIFFs with "band interleaving", the
<DIV></DIV>&gt;GDAL output default.&nbsp;&nbsp; I would suggesting using the INTERLEAVE=PIXEL
<DIV></DIV>&gt;creation option.
<DIV></DIV>&gt;
<DIV></DIV>&gt;ie.
<DIV></DIV>&gt;Change:
<DIV></DIV>&gt;
<DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp; // Create the output file.
<DIV></DIV>&gt;&nbsp;&nbsp;hDstDS = GDALCreate( hDriver, fileNameOut, nPixels, nLines,
<DIV></DIV>&gt;GDALGetRasterCount(hSrcDS), eDT, NULL );
<DIV></DIV>&gt;
<DIV></DIV>&gt;
<DIV></DIV>&gt;To this:
<DIV></DIV>&gt;
<DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp; char *apszOptions[] = { "INTERLEAVE=PIXEL", NULL };
<DIV></DIV>&gt;
<DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp; hDstDS = GDALCreate( hDriver, fileNameOut, nPixels, nLines,
<DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GDALGetRasterCount(hSrcDS), eDT,
<DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;apszOptions );
<DIV></DIV>&gt;
<DIV></DIV>&gt;Best regards,
<DIV></DIV>&gt;--
<DIV></DIV>&gt;---------------------------------------+--------------------------------------
<DIV></DIV>&gt;I set the clouds in motion - turn up&nbsp;&nbsp; | Frank Warmerdam, warmerdam@pobox.com
<DIV></DIV>&gt;light and sound - activate the windows | http://pobox.com/~warmerdam
<DIV></DIV>&gt;and watch the world go round - Rush&nbsp;&nbsp;&nbsp;&nbsp;| Geospatial Programmer for Rent
<DIV></DIV></div></html>