[gdal-dev] gdal_translate drops overviews

Jean-Claude Repetto jrepetto at free.fr
Fri Jan 14 02:41:42 EST 2011


On 01/14/11 00:02, Even Rouault wrote:
> Le jeudi 13 janvier 2011 22:33:41, Jean-Claude REPETTO a écrit :
>
>> Thanks for your answer. Unfortunately, I get an error message :
>>
>> $ gdal_translate -co COPY_SRC_OVERVIEWS=YES 314-Calvi_ozf.map 314-Calvi.tif
>> Input file size is 3303, 3080
>> 0ERROR 1: Input and output dataset sizes or band counts do not
>> match in GDALDatasetCopyWholeRaster()
>
> Fixed by http://trac.osgeo.org/gdal/ticket/3905
>

Thanks for the fix. Now, the overviews are created. But the 
georeferencing is lost :

$ gdalinfo  -noct 314-Calvi_ozf.map
Driver: OZI/OZI
Files: 314-Calvi_ozf.map
Size is 3303, 3080
Coordinate System is `'
GCP Projection =
GEOGCS["WGS 84",
     DATUM["WGS_1984",
         SPHEROID["WGS 84",6378137,298.257223563,
             AUTHORITY["EPSG","7030"]],
         AUTHORITY["EPSG","6326"]],
     PRIMEM["Greenwich",0,
         AUTHORITY["EPSG","8901"]],
     UNIT["degree",0.0174532925199433,
         AUTHORITY["EPSG","9122"]],
     AUTHORITY["EPSG","4326"]]
GCP[  0]: Id=, Info=
           (1424.8,1814.4) -> (8.993495,42.6204233333333,0)
GCP[  1]: Id=, Info=
           (2517.6,128) -> (9.38468166666667,43.0045783333333,0)
GCP[  2]: Id=, Info=
           (3032,2982.4) -> (9.48353166666667,42.3152916666667,0)
GCP[  3]: Id=, Info=
           (424.8,2998.4) -> (8.64604166666667,42.3554333333333,0)
GCP[  4]: Id=, Info=
           (634.4,2276.8) -> (8.726415,42.524225,0)
GCP[  5]: Id=, Info=
           (2463.2,1112) -> (9.34382,42.77031,0)
GCP[  6]: Id=, Info=
           (2902.4,1976) -> (9.46631333333333,42.5577266666667,0)
GCP[  7]: Id=, Info=
           (1676.8,2932.8) -> (9.05197166666667,42.3517083333333,0)
GCP[  8]: Id=, Info=
           (1985.6,2004.8) -> (9.17002,42.5658716666667,0)
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0, 3080.0)
Upper Right ( 3303.0,    0.0)
Lower Right ( 3303.0, 3080.0)
Center      ( 1651.5, 1540.0)
Band 1 Block=64x64 Type=Byte, ColorInterp=Palette
   Overviews: 826x770, 330x308, 165x154, 83x77
   Color Table (RGB with 256 entries)


$ gdalinfo -noct 314-Calvi.tif
Driver: GTiff/GeoTIFF
Files: 314-Calvi.tif
Size is 3303, 3080
Coordinate System is `'
Image Structure Metadata:
   INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0, 3080.0)
Upper Right ( 3303.0,    0.0)
Lower Right ( 3303.0, 3080.0)
Center      ( 1651.5, 1540.0)
Band 1 Block=3303x2 Type=Byte, ColorInterp=Palette
   Overviews: 826x770, 330x308, 165x154, 83x77
   Color Table (RGB with 256 entries)


Regards,
Jean-Claude


More information about the gdal-dev mailing list