[postgis-devel] WKT Raster: GDAL or World file upper left coordinates
Frank Warmerdam
warmerdam at pobox.com
Thu Mar 5 06:54:25 PST 2009
Pierre Racine wrote:
> gdal2wktraster.py stores the GDAL version of the upper left corner
> coordinate. This seems to be the real (or external) upper left corner.
>
> World files (and WKT Raster) stores the "center" of the upper left pixel
> which is not the same thing. rt_raster_envelope(raster) was implemented
> this way. It add half of a pixelsize to get the BBOX of the raster. So
> now it returns an envelop a bit too big.
>
> We'll have to decide if we stick to GDAL specs or to World file specs.
>
> Why does GDAL does not stick to the Word File specs? What are the pros
> and cons of one way over the other?
Pierre,
"Why does GDAL not stick to the World File specs?"
Dare I suggest that the world file is not the definative georeferencing
standard for raster data from which all others are derived? God did
not create the world file specification during the first six days and
declare it to be in his image.
The decision to go with center of top left pixel or top left corner
of top left pixel as the origin of a raster is relatively arbitrary.
The most important thing is to be consistent and well documented with
regard to what is done.
I do think that a raster envelope for a raster needs to be out to the
edges of the pixels if the pixels are considered to be areas as is the
case with most optical and area oriented GIS raster data.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the postgis-devel
mailing list