[postgis-devel] Affine() transformation matrix

strk at refractions.net strk at refractions.net
Wed Feb 22 06:12:54 PST 2006


I just committed the new affine() based transformation
functions provided by Bruce.

This introduces an affine() function, makes scale()  and
translate() use it and adds rotate() function (still using
affine()).

The TransScale function has been deprecated. This is becase
it insists in a specified order between a translation and
a rescale. I'm not sure if implementing it using of affine()
is possible at all (wrt to ordering). I didn't inspect it.

The affine() function itself is not currently documented so
it's not to be considered a user-level function.

--strk;

On Sat, Feb 11, 2006 at 09:50:58AM -0700, Bruce Rindahl wrote:
> >Hi, Paul,
> 
> >Paul Ramsey wrote:
> 
> >> You just have... if you want to ensure your request is not lost, you 
> >> should file it in the bug tracker, and describe more precisely what
> you
> >> mean.  Function signature is presumably rotate(geometry,float).
> But,
> >> rotate about what?  Maybe it should be rotate
> (geometry,geometry,float)
> >> where the second geometry is a point of  rotation?
> 
> >Maybe it is a good idea to refactor the existing translate / scale /
> >transscale function into a unique lineartransform function that uses a
> >transformation matrix. All of translate / scale / rotate can then be
> >expressed via such a matrix, and we can provide the matrix function in
> >public.
> 
> This would be the cleanest solution.  The same approach is available in
> PostScript, SVG, etc.
> 
> Bruce Rindahl



More information about the postgis-devel mailing list