[postgis-devel] Affine() transformation matrix

Markus Schaber schabi at logix-tt.com
Wed Feb 22 06:47:36 PST 2006


Hi, Strk,

strk at refractions.net wrote:

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

Yes, it is. Its one of the fundamentals that each concatenation of two
affine transformations is an affine transformation itsself.

This combineability is the reason why affine transformations are used in
most graphics systems - if you need several of them applied to the
geometry, simply multiply the transformation matrices, and then apply
the resulting transformation once.

Of course, the ordering is important, translating after scaling leads to
different results than scaling after translating, and this must be
obeyed when creating the transformation matrix.

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

Is there any other reason than lack of documentation? If no, I'd provide
one.

Btw, as I invented transscale, I'll write a replacement using affine
this day.

Markus
-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org



More information about the postgis-devel mailing list