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

Bborie Park bkpark at ucdavis.edu
Wed Apr 6 07:10:41 PDT 2011

> 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).

This -- reprojecting -- is what I was hoping to do next while I
continue chewing on ST_Reclass (or ST_Resample?)  I wouldn't mind
taking on resampling once I get my feet wet looking at the gdal warp

> -"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.
> So:
> -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.

Yes, a generic ST_GDALWarp function would be nice.  I'm going to have
to see how distinct the reprojecting and warping really are.  From the
sample code I've seen, reprojecting appears not to be too difficult.


Bborie Park
Center for Vectorborne Diseases
UC Davis
bkpark at ucdavis.edu

More information about the postgis-devel mailing list