<html><div style='background-color:'><DIV class=RTE>
<P>Hello Frank,</P>
<P> 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> 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> Thank you again.</P>
<P> Ilya S.</P></DIV>
<DIV></DIV>>From: Frank Warmerdam <fwarmerdam@gmail.com>
<DIV></DIV>>Reply-To: warmerdam@pobox.com
<DIV></DIV>>To: Ilya Serebrianik <predator2448@hotmail.com>
<DIV></DIV>>CC: gdal-dev@xserve.flids.com
<DIV></DIV>>Subject: Re: [Gdal-dev] Warping GeoTIFF colour image - beginner question(s)
<DIV></DIV>>Date: Mon, 2 May 2005 15:27:06 -0400
<DIV></DIV>>
<DIV></DIV>>On 5/2/05, Ilya Serebrianik <predator2448@hotmail.com> wrote:
<DIV></DIV>> > I also tried using the precompiled tools from the GDAL website, specifically
<DIV></DIV>> > the warp tool and it also produces the squished effect. Perhaps the GeoTIFF
<DIV></DIV>> > I am using as a source is special in some sense and needs to be processed in
<DIV></DIV>> > a special way, I am not sure. Here is the information extracted using
<DIV></DIV>> > gdalinfo.exe about the image, it is around 75 MB:
<DIV></DIV>>
<DIV></DIV>>Ilya,
<DIV></DIV>>
<DIV></DIV>>A light bulb just went off for me. I am willing to bet you are using a
<DIV></DIV>>simplistic GeoTIFF reader - perhaps ArcView or ArcGIS? Many tools
<DIV></DIV>>have trouble reading multi-band TIFFs with "band interleaving", the
<DIV></DIV>>GDAL output default. I would suggesting using the INTERLEAVE=PIXEL
<DIV></DIV>>creation option.
<DIV></DIV>>
<DIV></DIV>>ie.
<DIV></DIV>>Change:
<DIV></DIV>>
<DIV></DIV>> // Create the output file.
<DIV></DIV>> hDstDS = GDALCreate( hDriver, fileNameOut, nPixels, nLines,
<DIV></DIV>>GDALGetRasterCount(hSrcDS), eDT, NULL );
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>To this:
<DIV></DIV>>
<DIV></DIV>> char *apszOptions[] = { "INTERLEAVE=PIXEL", NULL };
<DIV></DIV>>
<DIV></DIV>> hDstDS = GDALCreate( hDriver, fileNameOut, nPixels, nLines,
<DIV></DIV>> GDALGetRasterCount(hSrcDS), eDT,
<DIV></DIV>> apszOptions );
<DIV></DIV>>
<DIV></DIV>>Best regards,
<DIV></DIV>>--
<DIV></DIV>>---------------------------------------+--------------------------------------
<DIV></DIV>>I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com
<DIV></DIV>>light and sound - activate the windows | http://pobox.com/~warmerdam
<DIV></DIV>>and watch the world go round - Rush | Geospatial Programmer for Rent
<DIV></DIV></div></html>