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