[gdal-dev] GeoTiff - image coordinates and world file

Aleksey Naumov anaumov at gmail.com
Thu Oct 22 11:39:58 EDT 2009


HI all,

I am trying to understand how coordinate information is stored in a GeoTiff
file, specifically the origin (UL corner) of the image. I have a few images
which clearly have wrong origins, so they do not display correctly. Both
ArcGIS and GDAL report incorrect origins.

Initially I thought that the world files for the images were at fault,
however, they look totally fine. Here is an example -- notice really large
X-coord of origin as reported by gdalinfo:
> gdalinfo 1km177310505102008GROUPEALTA.tif
Driver: GTiff/GeoTIFF
Files: 1km177310505102008GROUPEALTA.tif
       1km177310505102008GROUPEALTA.tfw
Size is 5000, 5000
Coordinate System is:
PROJCS["UTM Zone 17N",
    GEOGCS["NAD83_CSRS_1",
        DATUM["NAD83_CSRS_1",
            SPHEROID["GRS 1980",6378137,298.2572220960423]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-81],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]
Origin = (5051999.800000000700000,5052000.000000000000000)
Pixel Size = (0.200000000000000,-0.200000000000000)
Metadata:
  TIFFTAG_SOFTWARE=Adobe Photoshop CS2 Windows
  TIFFTAG_DATETIME=2008:12:30 16:08:24
  TIFFTAG_XRESOLUTION=72
  TIFFTAG_YRESOLUTION=72
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  ( 5051999.800, 5052000.000) ( 34d52'42.64"W, 34d45'16.48"N)
Lower Left  ( 5051999.800, 5051000.000) ( 34d52'48.38"W, 34d44'52.51"N)
Upper Right ( 5052999.800, 5052000.000) ( 34d52'28.05"W, 34d45'5.78"N)
Lower Right ( 5052999.800, 5051000.000) ( 34d52'33.77"W, 34d44'41.81"N)
Center      ( 5052499.800, 5051500.000) ( 34d52'38.21"W, 34d44'59.14"N)
Band 1 Block=5000x1 Type=Byte, ColorInterp=Red
Band 2 Block=5000x1 Type=Byte, ColorInterp=Green
Band 3 Block=5000x1 Type=Byte, ColorInterp=Blue

The world file looks fine to me, and it has correct origin info (X-coord):
> type 1km177310505102008GROUPEALTA.tfw
0.200000
0.000000
0.000000
-0.200000
731000.100000
5051999.900000

Even if I rename the TFW file, gdalinfo still reports the same incorrect
origin, so it must be stored in a GeoTiff tag, I guess? If so, how do I
override and correct this info on an image? Also, does a world file not have
a higher priority than a built-in tag value?

Thank you,
Aleksey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20091022/735ea5dc/attachment.html


More information about the gdal-dev mailing list