[postgis-devel] 8BUI JPEG and PNG raster export

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Tue Apr 5 13:42:13 PDT 2011

>I haven't given much thought to ST_Resample or any of the other
>functions described in FV.06.  I was going to start with ST_Transform
>first but since reprojecting and warping do go hand in hand, I'll have
>to do some digging.

Yes. Sorry about that. I had in mind that you would work on ST_Resample. Actually you showed interest in ST_Transform.

I already had a look at reprojecting VS warping. From my understanding they are two different operations (which actually are pretty similar in that they all resample the original image to another one) even if GDAL wrap them into the same tool. They mainly differs by the kind of object they take as input to know how to warp the raster:

-"Reprojecting" (ST_Transform in PostGIS terminology) "resample" the raster according to a new coordinate system (projected or not).

-"Warping" "resample" the raster according to a polynomial equation or a set of GDP (Geographic?? Control Points)

-There is also "resample" which "resample" a raster to a new grid.

I think these should be three different PostGIS functions from a user point of view event if under the hood they all use the same warp GDAL code.

Still they are very different from ST_SetGeoreference and ST_SetSRID.


-reproject (ST_Transform), warp (ST_Warp??) and ST_Resample do not move the raster but "resample" following three different mathematical techniques.

-ST_SetGeoreference moves it (along with ST_SetUpperLeft , ST_SetScale and ST_SetSkew and future ST_Translate and ST_Rotate) without touching the raster shape itself.

-ST_SetSRID tell the raster in which coordinate system it is without touching the raster shape itself.

Again we could have a generic ST_GDALWarp(raster, option text) function and wrap ST_Transform, ST_Warp and ST_Resample around it taking variation of what each need but still is a user knows GDAL he can use its own GDAL complex option string.


More information about the postgis-devel mailing list