[Gdal-dev] TIFF World file issue
Markus Neteler
neteler at itc.it
Wed Feb 15 08:23:31 EST 2006
Hi,
I was downloading a tile of "Natural Earth"
http://www.shadedrelief.com/natural/
The TFW file looks like this (world map):
cat LC_SR_W_16200_W.tfw
0.01111111111111
0.00000000000000
0.00000000000000
-0.01111111111111
-180.00000000000000
90.00000000000000
and gdalinfo reports:
gdalinfo LC_SR_W_16200_W.tif
Driver: GTiff/GeoTIFF
Size is 16200, 16200
Coordinate System is `'
Origin = (-180.005556,90.005556)
Pixel Size = (0.01111111,-0.01111111)
Metadata:
TIFFTAG_SOFTWARE=Adobe Photoshop CS Macintosh
TIFFTAG_DATETIME=2005:04:04 16:36:25
TIFFTAG_XRESOLUTION=72
TIFFTAG_YRESOLUTION=72
TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
Corner Coordinates:
Upper Left (-180.0055556, 90.0055556)
Lower Left (-180.0055556, -89.9944444)
Upper Right ( -0.0055556, 90.0055556)
Lower Right ( -0.0055556, -89.9944444)
Center ( -90.0055556, 0.0055556)
Band 1 Block=16200x1 Type=Byte, ColorInterp=Red
Band 2 Block=16200x1 Type=Byte, ColorInterp=Green
Band 3 Block=16200x1 Type=Byte, ColorInterp=Blue
Is the TFW file wrong or the gdalinfo output?
As far as I know, TFW refers to the corner of a pixel [1]
which is not reflected in the gdalinfo output.
However, [2] says that TFW refers to the center of the pixel.
R tells me:
> options(digits=12)
> 90.0055556 - 0.01111111/2
[1] 90.000000045
> 16200 * 0.01111111
[1] 179.999982
Thanks
Markus
[1] http://lists.maptools.org/pipermail/gdal-dev/2004-April/002416.html
[2] http://lists.maptools.org/pipermail/gdal-dev/2005-May/005720.html
More information about the Gdal-dev
mailing list