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

Zoltan Szecsei zoltans at geograph.co.za
Mon Dec 21 03:11:20 EST 2009


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.
Thanks in advance,
Zoltan

Extract from tiffdump:
00 18000 18000 18000 18000 18000 18000 18000 18000 18000 18000 18000
18000 18000>
PlanarConfig (284) SHORT (3) 1<1>
SampleFormat (339) SHORT (3) 3<1 1 1>
33922 (0x8482) DOUBLE (12) 216<0.5 0.5 0 27.3782 -11.1753 0 1200.3 0.5 0
27.5098 -11.2066 0 2400.1 0.5 0 27.6414 -11.238 0 3599.9 0.5 0 27.7731
-11.2694 0 4799.7 0.5 0 27.9047 -11.3008 0 5999.5 0.5 0 28.0363 -11.3321
0 0.5 1200.3 0 27.3525 -11.281 0 1200.3 1200.3 0 27.4841 -11.3124 0
2400.1 1200.3 0 27.6158 -11.3437 0 3599.9 1200.3 0 27.7474 -11.3751 0
4799.7 1200.3 0 27.879 -11.4065 0 5999.5 1200.3 0 28.0106 -11.4378 0 0.5
2400.1 0 27.3268 -11.3867 0 1200.3 2400.1 0 27.4585 -11.4181 0 2400.1
2400.1 0 27.5901 -11.4495 0 3599.9 2400.1 0 27.7217 -11.4808 0 4799.7
2400.1 0 27.8533 -11.5122 0 5999.5 2400.1 0 27.9849 -11.5436 0 0.5
3599.9 0 27.3012 -11.4924 0 1200.3 3599.9 0 27.4328 -11.5238 0 2400.1
3599.9 0 27.5644 -11.5552 0 3599.9 3599.9 0 27.696 -11.5866 0 4799.7
3599.9 0 27.8276 -11.6179 0 5999.5 3599.9 0 27.9592 -11.6493 0 0.5
4799.7 0 27.2755 -11.5982 0 1200.3 4799.7 0 27.4071 -11.6295 0 2400.1
4799.7 0 27.5387 -11.6609 0 3599.9 4799.7 0 27.6703 -11.6923 0 4799.7
4799.7 0 27.8019 -11.7236 0 5999.5 4799.7 0 27.9335 -11.755 0 0.5 5999.5
0 27.2498 -11.7039 0 1200.3 5999.5 0 27.3814 -11.7353 0 2400.1 5999.5 0
27.513 -11.7666 0 3599.9 5999.5 0 27.6446 -11.798 0 4799.7 5999.5 0
27.7762 -11.8294 0 5999.5 5999.5 0 27.9079 -11.8607 0>
34735 (0x87af) SHORT (3) 24<1 1 0 5 1024 0 1 2 1025 0 1 1 2048 0 1 4326
2049 34737 9 0 2054 0 1 9102>
34736 (0x87b0) DOUBLE (12) 1<0>
34737 (0x87b1) ASCII (2) 10<WGS_1984|\000>
42112 (0xa480) ASCII (2) 5777<<GDALMetadata>\n  <Item
name="STATISTICS_MINIMUM" sample="0">26</Item>\n  <Item
name="STATISTICS_MAXIMUM" sample="0">255</Item>\n  <Item
name="STATISTICS_MEAN" sample="0">120.17384</Item>\n  <Item
name="STATISTICS_MEDIAN" sample="0">120</Item>\n  <Item
name="STATISTICS_MODE" sample="0">122</Item>\n  <Item
name="STATISTICS_STDDEV" sample="0">17.84385760024</Item>\n  <Item
name="STATISTICS_HISTONUMBINS" sample="0">256</Item>\n  <Item
name="STATISTICS_HISTOMIN" sample="0">0</Item>\n  <Item
name="STATISTICS_HISTOMAX" sample="0">255</Item>\n  <Item
name="LAYER_TYPE" sample="0">athematic</Item>\n  <Item
name="STATISTICS_HISTOBINVALUES"
sample="0">0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|36|360|3168|1836|900|684|792|1044|576|360|612|936|864|756|180|720|684|504|504|612|684|1008|1260|2088|2160|4068|3852




-- 

===========================================
Zoltan Szecsei
Director

Geograph (Pty) Ltd.
P.O. Box 7, Muizenberg 7950, South Africa.

65 Main Road, Muizenberg 7945
Western Cape, South Africa.

34° 6'16.35"S 18°28'5.62"E

Tel: +27-21-7884897
Fax: +27-86-6115323    www.geograph.co.za
===========================================

-------------- next part --------------
Skipped content of type multipart/alternative


More information about the gdal-dev mailing list