[Gdal-dev] (little) Problem with the gdal_translate srcwin option

Frank Warmerdam warmerdam at pobox.com
Thu Jan 26 08:44:55 EST 2006


On 1/26/06, Olivier Wymann <olivier.wymann at itelios.com> wrote:
>
> I'm using gdal v1.3.1.0, and I got a problem when I try to extract a subwin
> from a geotiff file :
>
>
>
> gdal_translate -srcwin 400 400 230 360 test.tif dest.tif
>
>
>
> The output file size and new geocoordinates seem to be ok, but the problem
> is the new file itself : in TatukGIS, the dest.tif file looks as if the 3
> bans where displayed with 3 different vertical offsets (not very easy to

Olivier,

Try:

  gdal_translate -co INTERLEAVE=PIXEL -srcwin 400 400 230 360 test.tif dest.tif

And see if the resulting file is ok in TatukGIS.  If it is, then
the problem is that TatukGIS doesn't support band interleaved
(Planar Configuration: Separate) files.  These are not "baseline"
TIFF, so you could make the case that GDAL should not generate
them by default.  You could also make the case that it is lame for
a respected piece of software like TatukGIS to not support them.

Of course, it could be something else.

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