[Gdal-dev] RasterPixelIsArea vs RasterPixelIsPoint
Simone
simboss1 at gmail.com
Mon Mar 12 18:23:05 EDT 2007
Hi all,
I am doing a sanity check with some geotiff files I have got.
There is this one in particular which is kind of suggesting me that I should
go back and revise the geotiff spec.
Here is the dump of gdalinfo:
Driver: GTiff/GeoTIFF
Size is 254, 254
Coordinate System is:
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.2572235630016,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4326"]]
Origin = (-74.096804075962808,37.037980546550187)
Pixel Size = (0.041685965724872,-0.041685965724872)
Metadata:
AREA_OR_POINT=Point
TIFFTAG_XRESOLUTION=1
TIFFTAG_YRESOLUTION=1
TIFFTAG_RESOLUTIONUNIT=1 (unitless)
Corner Coordinates:
Upper Left ( -74.0968041, 37.0379805) ( 74d 5'48.49"W, 37d 2'16.73"N)
Lower Left ( -74.0968041, 26.4497453) ( 74d 5'48.49"W, 26d26'59.08"N)
Upper Right ( -63.5085688, 37.0379805) ( 63d30'30.85"W, 37d 2'16.73"N)
Lower Right ( -63.5085688, 26.4497453) ( 63d30'30.85"W, 26d26'59.08"N)
Center ( -68.8026864, 31.7438629) ( 68d48'9.67"W, 31d44'37.91"N)
Band 1 Block=254x1 Type=Byte, ColorInterp=Red
Band 2 Block=254x1 Type=Byte, ColorInterp=Green
Band 3 Block=254x1 Type=Byte, ColorInterp=Blue
As pointed out here:
http://lists.maptools.org/pipermail/geotiff/2006-January/000212.html
or here
http://www.remotesensing.org/geotiff/spec/geotiff2.5.html#2.5.2
the RasterPixelIsPoint tag should suggest to map TiePoints coordinates to
the center
of the cells. Hence there is a half of a pixel shift between the an
hypothetical TiePoint
of the form (0,0,0,lon,lat,0) and the ULC.
I manually inspected the tiff tags of this image (yeah what a fun!!!) .
The provided TiePoint is as follows:
[0.0, 0.0, 0.0, -74.09680407596281, 37.03798054655019, 0.0]
and PixScale is
(0.041685965724872,-0.041685965724872).
The RasterType is PixelIsPoint.
Taking this into account, why GDAL is reporting me ULC coordinate at the
same position of this tie point?
Is the half-a-pixel translation missing? Is it just me that is making a big
confusions?
Thx for any feedback.
Simone.
BTW, I know this question might be good for the GeoTiff ml but since I am
playing with GDAL right now
I thought it would have been great to post it here, at least initially.
-------------------------------------------------------
Eng. Simone Giannecchini
President/CEO GeoSolutions
http://www.geo-solutions.it
Via Carignoni 51
550141 Camaiore (LU)
Italy
Mobile: +39 333 81 28928
-------------------------------------------------------
More information about the Gdal-dev
mailing list