[gdal-dev] lost GeoTiff file metadata with gdalwarp

fred p mapoubelle22 at gmail.com
Thu Nov 10 07:40:16 EST 2011


Hello list !

I use the gdalwarp tool to change the projection of a GeoTiff file but the
most of the metadata of the source file are lost, which is not the case
with the gdal_translate tool.
Particularly, the following metadata are lost :
  TIFFTAG_DOCUMENTNAME
  TIFFTAG_IMAGEDESCRIPTION
  TIFFTAG_SOFTWARE
  TIFFTAG_DATETIME
  TIFFTAG_ARTIST
  TIFFTAG_HOSTCOMPUTER

Do I miss something ?


The command :

gdalwarp -t_srs EPSG:4326 srcfile.tif outfile.tif


The gdalinfo output on the source file, followed by the gdalinfo output on
the output file :

Driver: GTiff/GeoTIFF
Files: srcfile.tif
Size is 2500, 2500
Coordinate System is:
PROJCS["Geostationary_Satellite",
    GEOGCS["GCS_unnamed ellipse",
        DATUM["D_unknown",
            SPHEROID["Unknown",6378160,298.2539162964669]],
        PRIMEM["Greenwich",0],
        UNIT["Degree",0.017453292519943295]],
    PROJECTION["Geostationary_Satellite"],
    PARAMETER["central_meridian",57],
    PARAMETER["satellite_height",35785846.6396],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["Meter",1]]
Origin = (-5620805.668447489850223,5620805.668447489850223)
Pixel Size = (4496.644534757992005,-4496.644534757992005)
Metadata:
  TIFFTAG_DOCUMENTNAME=documentname
  TIFFTAG_IMAGEDESCRIPTION=productidentification={
        "observedProperty":"observedProperty",
        "process":"process",
}
  TIFFTAG_SOFTWARE=software
  TIFFTAG_DATETIME=2011:11:10 11:00:00
  TIFFTAG_ARTIST=artist
  TIFFTAG_HOSTCOMPUTER=computer
  AREA_OR_POINT=Area
Image Structure Metadata:
  COMPRESSION=JPEG
  INTERLEAVE=BAND
Corner Coordinates:
ERROR 1: tolerance condition error
Upper Left  (-5620805.668, 5620805.668)
ERROR 1: tolerance condition error
Lower Left  (-5620805.668,-5620805.668)
ERROR 1: tolerance condition error
Upper Right ( 5620805.668, 5620805.668)
ERROR 1: tolerance condition error
Lower Right ( 5620805.668,-5620805.668)
Center      (   0.0000000,   0.0000000) ( 57d 0'0.00"E,  0d 0'0.01"N)
Band 1 Block=2500x1 Type=Byte, ColorInterp=Gray


The gdalinfo output on the output file :

Driver: GTiff/GeoTIFF
Files: outfile.tif
Size is 1673, 1673
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (0.000000000000000,70.000000000000000)
Pixel Size = (0.059772863120143,-0.059772863120143)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (   0.0000000,  70.0000000) (  0d 0'0.01"E, 70d 0'0.00"N)
Lower Left  (   0.0000000, -30.0000000) (  0d 0'0.01"E, 30d 0'0.00"S)
Upper Right ( 100.0000000,  70.0000000) (100d 0'0.00"E, 70d 0'0.00"N)
Lower Right ( 100.0000000, -30.0000000) (100d 0'0.00"E, 30d 0'0.00"S)
Center      (  50.0000000,  20.0000000) ( 50d 0'0.00"E, 20d 0'0.00"N)
Band 1 Block=1673x4 Type=Byte, ColorInterp=Gray

<http://int.ask.com/web?siteid=10000861&webqsrc=999&l=dis&q=dust%20RGB%20composite>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20111110/5e207812/attachment-0001.html


More information about the gdal-dev mailing list