If I follow you correctly, you are trying to apply an Affine transformation
on your table here.  This can be done without purchasing a canned utility
from someone else, though unfortunately it's not as easy as just clicking a
button, but it can be done.  If you're going to be doing this all the time
it might be worth the cost for getting a utility for doing so from one of
the respondents I see on the list.

-Bill

Summary: Affine transformations from Version 5.0 User Guide

Question: How does one perform an affine transformation in MapInfo?

Answer: Affine Transformations

          MapInfo also provides the ability to define rotated or skewed
     coordinate systems by allowing an optional Affine Transformation in
     any coordinate system definition.  (This can be done in MapInfo
     versions 4.1.2 and later.)
     You can also define a coordinate system with Bounds and an Affine
     Transformation.  In that case, add 3000 to the projection number,
     enter the Affine parameters (A,B,C,D,E,F) and then list the Bounds
     (x1,y1,x2,y2).  The general form is:

          Name, Projection Number + 3000, projection components (from 5.0
          Appendix G), Affine units, A, B, C, D, E, F, x1, y1, x2, y2

     An example of a Mapinfow.prj line with a rotated Affine transformation
     might look like this with the Affine parameters in Bold and Bounds in
     Italics:

          "Equal Area for GA (NAD 27)", 3009, 62, 7, -96, 23, 29.5, 45.5,
     0, 0, 7, -0.00000000001, 1, -116.071, -1, -0.00000000001, -50.5312,
     -6972009.20702, -16901023.2253, 26829936.181, 16900922.1627

     Description of an Affine transformation
     An affine transformation has the following form:
          x' = Ax + By + C
          y' = Dx + Ey + F

          In these equations, the base coordinates (x, y) are transformed
     to produce the derived coordinates (x', y').  The six constants A
     through F determine the effect of the transformation and we use the
     post multiply method for homogenous 2D coordinate systems.  This can
     be considered a matrix operation as follows:

        A   B   C           X              X

�
        D   E   F      *   Y      =      Y�
        0    0   1           1              1             Where (X,Y) and
     (X�,Y�) are as defined above.

To do various types of affine transformations the values of A, B, B, D, E,
and F need to be determined.  It is fairly easy to define the basic
Transformations/Translations, Rotations, Scaling in X, Scaling in Y,
Shearing in X and Shearing in Y that can be done using an Affine
Transformation.

Transformation: C and F are the values you want (0, 0) to go to, A=E=1 and
B=D=0.  So to move the coordinate system so the origin is at (5, 2) the
values would be: A=1, B=0, C=5, D=0, E=1, and F=2.

Rotation about the origin: A=E=cos (angle to rotate), -B=D=sin (angle to
rotate), C=F=0.  So to rotate 60 degree counterclockwise around the origin,
A=.5,B=-.866, C=0, D= .866, E= .5, and F=0.

To Scale in the X direction: A is the scale you want to use.  E =1 and the
rest are 0.  So to scale to 3 times the size in the X direction the values
would be A=3, B=0, C=0, D=0, E= 1, F=0.

To Scale in the Y direction: E is the scale you want to use.  A =1 and the
rest are 0.  So to scale to 5 times the size in the Y direction the values
would be A=1, B=0, C=0, D=0, E= 5, F=0.

To Scale Overall: just make sure that A and E are equal.

To Shear in the X direction: A = E = 1, B is the shear factor and the rest
are 0.  So to Shear by 5 units in the X direction then A=1, B=5, C=0, D= 0,
E=1, F= 0.

To Shear in the Y direction: A = E = 1, D is the Shear factor and the rest
are 0.  So to Shear by 4 units in the Y direction then A=1, B=0, C=0, D= 4,
E=1, F= 0.

Now to get a General Affine Transformation: do a pre-matrix multiplication
of the basic pieces of the transformation.  Make sure that you put the
first operation on the right.  So to Translate to (5,2) Rotate 60 degrees
and then Shear 5 units in Y and then Translate to (3, 2). The values would
be  A=.5, B= -.866, C=6.232, D=3.366, E=-2.23, F=22.758.

For more general information please consult a basic computer graphics book,
noting that everything can be turned into pre-multiplication by transposing
the above matrices.  See Also the MapBasic Reference for a discussion of
affine transformation in the CoordSys section.

Reply via email to