[postgis-devel] WKT Raster: GDAL or World file upper left coordinates

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Wed Mar 4 15:10:12 PST 2009


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




More information about the postgis-devel mailing list