[postgis-devel] [WKT Raster] For clearer and friendly georeferencing

Mateusz Loskot Mateusz.Loskot at cadcorp.com
Tue Jun 2 02:54:56 PDT 2009


Pierre Racine wrote: 
> In the WKT Raster specifications RT_GetGeoReference(raster) returns a
> World File and according to the World File spec RT_UpperLeftX(raster)
> and RT_UpperLeftY(raster) return the X and Y coordinate of the CENTER
> of the top left pixel.

Yes

> Since:
> 
> -World File is (or seams to be) an ESRI specific spec
> -GDAL georeference scheme favor the CORNER of the top left pixel
> (http://www.gdal.org/classGDALDataset.html#f9593cc241e7d140f5f3c4798a43a668)

Yes

> -We are becoming more and more good friends with GDAL

So far, Only gdal2wktraster uses GDAL.

> To better stick to GDAL and to make everything clearer, I will change
> the specs this way:
>
> -RT_UpperLeftX() and RT_UpperLeftY() will now return the coordinate of
> the top left CORNER of the top left pixel. This is also what we are
> going to store as ipX & ipY in the future.

Does it mean after you change these SQL functions, raster header will
still return center of the top left pixel?

> -RT_GeoReference(raster) will be renamed RT_GdalGeoTransform(raster)
> -There will ge a new RT_ESRIWorldFile() function doing basically the
> same as RT_GdalGeoTransform() but according to the world file specs

Gdal is probably wrong spelling, if you care about spelling
ESRI correctly :-)

> This will, by the way, fix our shifted RT_Envelope() (ticket 150) and
> gdal2wktraster.py will stay unchanged.

OK

> Don't worry too much if this break your application (is there any?)
> since I will anyway soon (today?) replace all the "RT_" prefixes with
> "ST_" (ticket 151)...

I hope there have been some clients developed already :-)

Best regards,
--
Mateusz Loskot
Senior Programmer, Cadcorp
http://www.cadcorp.com





More information about the postgis-devel mailing list