[postgis-devel] [raster] Terminology cleanup and glossary

Bryce L Nordgren bnordgren at gmail.com
Tue Nov 15 07:52:20 PST 2011


Some things are getting clouded.

"Warping" involves calculating coordinates for a grid in a different
coordinate system. You could do the same thing by making a multipoint
geometry of each grid cell center and applying the projection. The
"projection" may be an affine transform (cell coordinates <-> geopoint) or
a more complex transform from one SRID to another. The name "warp" may
represent the fact that in all but the simplest of cases, the
projected/transformed "grid points" will no longer be regularly spaced, and
may not look much like a grid at all. Simplified special cases of "warping"
which do not change the SRID are scaling, rotation, translation, etc.
"Warping" is really the plural of "ST_Transform(point)".

"Sampling" involves generating a value for an arbitrary point within the
grid, after a coordinate has been calculated. No projection or
transformation is necessary. The calculated value may use one or more grid
values near the point. Names for common sampling algorithms include:
"nearest neighbor", "bilinear", "bicubic", etc.

"Resampling" combines warping and sampling. Pick a warping method, then
pick a sampling method; out pops a fully defined grid populated with
values. While sampling may be applied to a single coordinate, resampling
generally refers to applying the same sampling method to every "warped"
grid point.

I want to call your attention to the fact that "Resampling" is the general
case of "ST_Transform(raster)". The transform method is a special case of
resampling the grid into another SRID, where the final result is aligned
with the SRID axes and the user may specify x & y pixel sizes but not
rotation, skew, height or width of the final result. You cannot perform
ST_Transform without resampling, but a resampling method is definitely the
place to allow finer grained control over the projection of a grid into
another srid. Allowing ST_Resample to cross srid boundaries does not
constitute "on the fly" projection or implicit projection. It is simply a
recognition that projecting an object with specific internal structure as
well as values is more complex than projecting geometries, which have
neither. At the same time, it is good to leave ST_Transform(raster) as the
go-to function for projecting a raster with intelligent defaults.

Food for thought,
Bryce
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20111115/61d2e80f/attachment.html>


More information about the postgis-devel mailing list