[gdal-dev] Why does gdal_translate rotate and rescale images?

Frank Warmerdam warmerdam at pobox.com
Mon Dec 21 08:51:03 EST 2009


Zoltan Szecsei wrote:
> Hi List,
> I have 2 pesky satellite images in .IMG format that need to be
> re-blocked because their tile size is not a multiple of 16 (so img2tiff
> cannot handle them).
> 
> gdal_translate -b 1 -b 2 -b 3 src.img dst.tif   does work, but it
> rotates & rescales my images (and loses the geo-referencing?).
> 
> Is this correct?
> 
> If this is the wrong list to post this query on, please direct me to the
> correct list.

Zoltan,

gdal_translate does not rotate images so I imagine there is some
aspects of the georeferencing of the source image which is being lost
in the transfer.

If you can make the image available, I could do some inspection to see what
seems to be happening.  Alternatively you could provide gdalinfo reports
on the original and final file, or perhaps even better a "hfatest -dt your.img"
report on the source image.

I need something that makes clear what is changing.  In order to fix things
I will likely need an image file demonstrating the problem.

A ticket would be appropriate.

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