[gdal-dev]
I'm conflicted: GeoTIFF's PixelIsPoint, myth or reality?
Brent Fraser
bfraser at geoanalytic.com
Mon Nov 26 15:01:57 EST 2007
Frank (and anyone else interested in 1/2 pixel accuracy in
GeoTIFFs),
Years ago I read about how the authors of the GeoTIFF spec
never intended the PixelIsPoint/PixelIsArea tag to indicate
the image origin (center or top-left of top left pixel) of
the SRS tie point. Regardless of the intent, some (most?)
s/w developers used it that way; perhaps the actual origin
was not obvious in the spec.
My problem is that GDAL follows the spec (or conversely
other popular apps don't!), ignores the tag for
geo-referencing purposes and uses the tie point as the
top-left of the top left pixel. No problem when creating
GeoTIFFs with GDAL as it sets PixelIsArea. And all is good
when reading PixelIsArea-style GeoTIFFs with GDAL.
But when reading PixelIsPoint-style GeoTIFFs (and
translating them), the reported tie point is shifted 1/2
pixel in X and Y (well, shifted from my expectation). I've
read past GDAL emails explaining changing GDAL would be
large effort (to say nothing of buying into the PixelIsPoint
myth) so perhaps a simple addition would keep me (and
others) within 1/2 a pixel:
Have the GDAL utilties issue a warning message when a
PixelIsPoint-style GeoTIFF is read. And maybe have an
option ( "-w" ?) to ignore the embedded tie point values and
instead try to use a world file (tfw), if it exists?
Brent Fraser
GeoAnalytic Inc.
Calgary, Alberta
More information about the gdal-dev
mailing list