com.esri.arcgis.geometry
Class AffineTransformation2D

java.lang.Object
  extended by com.esri.arcgis.geometry.AffineTransformation2D
All Implemented Interfaces:
IAffineTransformation2D, IAffineTransformation2D2, IAffineTransformation2D3, IAffineTransformation2D3GEN, ITransformation, ITransformationGEN, IZShift, com.esri.arcgis.interop.RemoteObjRef, IClone, ISupportErrorInfo, Serializable

public class AffineTransformation2D
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, ITransformationGEN, IAffineTransformation2D3GEN, ITransformation, IAffineTransformation2D, IAffineTransformation2D2, IAffineTransformation2D3, IClone, ISupportErrorInfo, IZShift

A two dimensional affine transformation.

Description

The AffineTransformation2D coclass offers the ability to construct custom
transformations for geometrical shapes. It is useful for creating
particular transformations that are not supported by ITransform2D and
also for performing numerous transformations in one go.

Transformations can be done in two different ways. Firstly, and most
commonly within the geometry model, the AffineTransformation2D
object can be used in the ITransform2D::Transform method to transform
an existing Geometry. Alternatively, the methods of ITransform can
be used to transform points or values individually.

AffineTransformation2D implements two types of transformation.
Conformal Transformation (IAffineTransformation2D3::DefineConformalFromControlPoints)
and Affine Tranformation (IAffineTransformation2D::DefineFromControlPoints).

CONFORMAL TRANSFORMATION


At least two points are required to define this transformation.
The CONFORMAL equations use 4 parameters.

MATHEMATICAL MODEL :
The transformation can be described by a set of ceofficients (a, b, c, d, e, f)
of two linear equations:

X =  ax + by + c

Y = -bx + ay + f

or in matrix form:














a
b
0


X
Y
1

=

x
y
1



-b
a
0














c
d
1

The transformation elements can be interpreted as a sequence of simple operations:

  Scaling * Rotation * Translation  = 









Sx
0
0



cos r
sin r
0



1
0
0


x
y
1



0
Sy
0



-sin r
cos r
0



0
1
0








0
0
1



0
0
1



Dx
Dy
1


Where :

  S - scaling factors (can be negative)

  r  - rotation angle in radians, measured counter-clockwise from x-

  axis (-pi < r <= pi)

  Dx, Dy - translation distances in x and y direction 



These elements have the following locations within the transformation
matrix by which a ROW vector {x, y, 1} is to be POST-multiplied.

Given the matrix above the equation parameters can be interpreted as :

a = S cos r 

b = S sin r 

c = Dx 

d = Dy 

AFFINE TRANSFORMATION

At least three points are required to define this transformation.
The AFFINE equations use six parameters.

MATHEMATICAL MODEL :
The transformation can be described by a set of ceofficients (a, b, c, d, e, f)
of two linear equations:

X = a * x + b * y + c 

Y = d * x + e * y + f 

or in matrix form:














a
d
0


X
Y
1

=

x
y
1



b
e
0














c
f
1

The transformation elements can be interpreted as a sequence of simple operations:

Scaling * Shearing * Rotation * Translation = 








Sx
0
1



1
0
0



cos r
sin r
0



1
0
0


x
y
1



0
Sy
0



tan s
1
0



-sin r
cos r
0



0
1
0








0
0
1



0
0
1



0
0
1



Dx
Dy
1


Where :

Sx, Sy - scaling factors (can be negative) 

s - skew angle of shearing along x-axis, measured from y-axis (-pi/2 < s < pi/2) 

r - rotation angle in radians, measured counter-clockwise from x-axis (-pi < r <= pi) 

Dx, Dy - translation distances in x and y direction (can be negative)


These elements have the following locations within the transformation matrix by which a ROW vector {x, y, 1} is to be POST-multiplied.


Sx * cos r
Sx * sin r
0


(Sy / cos s) * sin (s - r)
(Sy / cos s) * cos (s - r)
0


Dx
Dy
1

Given the matrix above the equation parameters can be interpreted as :
a = Sx cos r
b = (Sy / cos s) sin(s - r)
c = Dx
d = Sx sin r
e = (Sy / cos s) cos(s - r)
f = Dy

Remarks

The skew angle is not public yet and cannot be directly get by using a method. But this angle can be calculated by first retrieveing some of the other parameters (b, d, r).

s = atan (b/d) + r

At 8.1, AffineTransformation2D does not implement the following methods:
IClone::Assign
IClone::IsEqual
IClone::IsIdentical
ITransformation::TransformMeasuresFF
ITransformation::TransformMeasuresFI
ITransformation::TransformMeasuresIF
ITransformation::TransformMeasuresII
ITransformation::TransformPointsIF
ITransformation::TransformPointsII

All of these methods return an HRESULT of E_NOTIMPL in C++. In VB, this is Error 445, "Object doesn't support this action".

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
AffineTransformation2D()
          Constructs a AffineTransformation2D using ArcGIS Engine.
AffineTransformation2D(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
AffineTransformation2D theAffineTransformation2D = (AffineTransformation2D) obj;
 
Method Summary
 void assign(IClone src)
          Assigns the properties of src to the receiver.
 void defineConformalFromControlPoints(int numPoints, IPoint fromPoints, IPoint toPoints)
          Defines the best conformal affine transformation between two sets of points.
 void defineConformalFromControlPoints(IPoint[] fromPoints, IPoint[] toPoints)
          Defines the best conformal affine transformation between two sets of points.
 void defineFromControlPoints(int numPoints, IPoint fromPoints, IPoint toPoints)
          Defines the best affine transformation between two sets of points.
 void defineFromControlPoints(IPoint[] fromPoints, IPoint[] toPoints)
          Defines the best affine transformation between two sets of points.
 void defineFromEnvelopes(IEnvelope from, IEnvelope to)
          Defines a transformation that maps a point relative to one envelope to a similar position relative to another envelope.
 void defineFromEnvelopesEx(IEnvelope from, IEnvelope to, IEnvelope outFrom, boolean assumeFalseOrigin, boolean keepAspect, boolean flipIt)
          Defines a transformation that maps a point relative to one envelope to a similar position relative to another envelope.
 void defineReflection(ILine l)
          Defines a transformation that can perform a reflection about the line l.
 boolean equals(Object o)
          Compare this object with another
 IClone esri_clone()
          Clones the receiver and assigns the result to *clone.
static String getClsid()
          getClsid.
 void getControlPointError(int i, double[] fromError, double[] toError)
          Returns the errors involved in moving control point i from the 'from' to 'to' system.
 IPoint getMoveOrigin()
          The origin of accumulated transformations used when projecting an affine transformation to a different spatial reference system.
 void getRMSError(double[] fromError, double[] toError)
          RMS (Root Mean Square) error expressed relative to the 'from' and 'to' points defining the transformation.
 double getRotation()
          The rotation angle.
 ISpatialReference getSpatialReference()
          The spatial reference in which this transformation is meaningful.
 double getXScale()
          The scale along the X axis.
 double getXTranslation()
          The translation along the X axis.
 double getYScale()
          The scale along the Y axis.
 double getYTranslation()
          The translation along the Y axis.
 void getZShift(double[] zOrigin, double[] zOffset)
          The shift in the Z direction.
 int hashCode()
          the hashcode for this object
 void interfaceSupportsErrorInfo(GUID riid)
          interfaceSupportsErrorInfo
 boolean isEqual(IClone other)
          Indicates if the receiver and other have the same properties.
 boolean isIdentical(IClone other)
          Indicates if the receiver and other are the same object.
 boolean isReflective()
          Indicates if the transformation contains a reflection (determinant is negative).
 void move(double dx, double dy)
          Incorporates a translation factor into the transformation.
 void moveVector(ILine movementVector)
          Performs an X and Y translation defined by a 2D vector.
 void postMultiply(IAffineTransformation2D postTransform)
          Post-multiplies the transformation by another transformation.
 void postMultiply(IAffineTransformation2D3GEN postTransform)
          Post-multiplies the transformation by another transformation.
 void preMultiply(IAffineTransformation2D preTransform)
          Pre-multiplies the transformation by another transformation.
 void preMultiply(IAffineTransformation2D3GEN preTransform)
          Pre-multiplies the transformation by another transformation.
 void project(ISpatialReference newSpatialReference)
          Moves this transformation into another spatial reference.
 void putZShift(double zOrigin, double zOffset)
          The shift in the Z direction.
 void queryLinearCoefficients(int direction, double[] params)
          Returns the linear coefficients which define the two dimensional affine transformation.
 void queryLinearCoefficients(int direction, double[][] params)
          Returns the linear coefficients which define the two dimensional affine transformation.
 void reset()
          Resets the tranformation.
 void rotate(double da)
          Incorporates a rotation (in radians) into the transformation.
 void scale(double dx, double dy)
          Incorporates scale factors into the transformation.
 void setLinearCoefficients(int direction, double[] params)
          Sets the linear coefficients which define the two dimensional affine transformation.
 void setMoveOrigin(IPoint origin)
          The origin of accumulated transformations used when projecting an affine transformation to a different spatial reference system.
 void setSpatialReferenceByRef(ISpatialReference sR)
          The spatial reference in which this transformation is meaningful.
 void transformMeasuresFF(int direction, double[] inMeasures, double[][] outMeasures)
          Transforms floating point measures to floating point measures (or do the inverse).
 void transformMeasuresFF(int direction, int cMeasures, double[] inMeasures, double[] outMeasures)
          Transforms floating point measures to floating point measures (or do the inverse).
 void transformMeasuresFI(int direction, double[] inMeasures, int[][] outMeasures)
          Transforms floating point measures to integer measures (or do the inverse).
 void transformMeasuresFI(int direction, int cMeasures, double[] inMeasures, int[] outMeasures)
          Transforms floating point measures to integer measures (or do the inverse).
 void transformMeasuresIF(int direction, int[] inMeasures, double[][] outMeasures)
          Transforms integer measures to floating point measures (or do the inverse).
 void transformMeasuresIF(int direction, int cMeasures, int[] inMeasures, double[] outMeasures)
          Transforms integer measures to floating point measures (or do the inverse).
 void transformMeasuresII(int direction, int[] inMeasures, int[][] outMeasures)
          Transforms integer measures to integer measures (or do the inverse).
 void transformMeasuresII(int direction, int cMeasures, int[] inMeasures, int[] outMeasures)
          Transforms integer measures to integer measures (or do the inverse).
 void transformPointsFF(int direction, double[] inPoints, double[][] outPoints)
          Transforms floating point points to floating point points (or do the inverse).
 void transformPointsFF(int direction, int cPoints, double[] inPoints, double[] outPoints)
          Transforms floating point points to floating point points (or do the inverse).
 void transformPointsFI(int direction, double[] inPoints, int[][] outPoints)
          Transforms floating point points to integer points (or do the inverse).
 void transformPointsFI(int direction, int cPoints, double[] inPoints, int[] outPoints)
          Transforms floating point points to integer points (or do the inverse).
 void transformPointsIF(int direction, int[] inPoints, double[][] outPoints)
          Transforms integer points to floating point points (or do the inverse).
 void transformPointsIF(int direction, int cPoints, int[] inPoints, double[] outPoints)
          Transforms integer points to floating point points (or do the inverse).
 void transformPointsII(int direction, int[] inPoints, int[][] outPoints)
          Transforms integer points to integer points (or do the inverse).
 void transformPointsII(int direction, int cPoints, int[] inPoints, int[] outPoints)
          Transforms integer points to integer points (or do the inverse).
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

AffineTransformation2D

public AffineTransformation2D()
                       throws IOException,
                              UnknownHostException
Constructs a AffineTransformation2D using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

AffineTransformation2D

public AffineTransformation2D(Object obj)
                       throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
AffineTransformation2D theAffineTransformation2D = (AffineTransformation2D) obj;

Construct a AffineTransformation2D using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to AffineTransformation2D.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

transformMeasuresFF

public void transformMeasuresFF(int direction,
                                double[] inMeasures,
                                double[][] outMeasures)
                         throws IOException,
                                AutomationException
Transforms floating point measures to floating point measures (or do the inverse).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
transformMeasuresFF in interface IAffineTransformation2D3GEN
Specified by:
transformMeasuresFF in interface ITransformationGEN
Parameters:
direction - A com.esri.arcgis.geometry.esriTransformDirection constant (in)
inMeasures - The inMeasures (in)
outMeasures - The outMeasures (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

transformMeasuresFI

public void transformMeasuresFI(int direction,
                                double[] inMeasures,
                                int[][] outMeasures)
                         throws IOException,
                                AutomationException
Transforms floating point measures to integer measures (or do the inverse).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
transformMeasuresFI in interface IAffineTransformation2D3GEN
Specified by:
transformMeasuresFI in interface ITransformationGEN
Parameters:
direction - A com.esri.arcgis.geometry.esriTransformDirection constant (in)
inMeasures - The inMeasures (in)
outMeasures - The outMeasures (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

transformMeasuresIF

public void transformMeasuresIF(int direction,
                                int[] inMeasures,
                                double[][] outMeasures)
                         throws IOException,
                                AutomationException
Transforms integer measures to floating point measures (or do the inverse).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
transformMeasuresIF in interface IAffineTransformation2D3GEN
Specified by:
transformMeasuresIF in interface ITransformationGEN
Parameters:
direction - A com.esri.arcgis.geometry.esriTransformDirection constant (in)
inMeasures - The inMeasures (in)
outMeasures - The outMeasures (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

transformMeasuresII

public void transformMeasuresII(int direction,
                                int[] inMeasures,
                                int[][] outMeasures)
                         throws IOException,
                                AutomationException
Transforms integer measures to integer measures (or do the inverse).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
transformMeasuresII in interface IAffineTransformation2D3GEN
Specified by:
transformMeasuresII in interface ITransformationGEN
Parameters:
direction - A com.esri.arcgis.geometry.esriTransformDirection constant (in)
inMeasures - The inMeasures (in)
outMeasures - The outMeasures (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

transformPointsFF

public void transformPointsFF(int direction,
                              double[] inPoints,
                              double[][] outPoints)
                       throws IOException,
                              AutomationException
Transforms floating point points to floating point points (or do the inverse).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
transformPointsFF in interface IAffineTransformation2D3GEN
Specified by:
transformPointsFF in interface ITransformationGEN
Parameters:
direction - A com.esri.arcgis.geometry.esriTransformDirection constant (in)
inPoints - The inPoints (in)
outPoints - The outPoints (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

transformPointsFI

public void transformPointsFI(int direction,
                              double[] inPoints,
                              int[][] outPoints)
                       throws IOException,
                              AutomationException
Transforms floating point points to integer points (or do the inverse).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
transformPointsFI in interface IAffineTransformation2D3GEN
Specified by:
transformPointsFI in interface ITransformationGEN
Parameters:
direction - A com.esri.arcgis.geometry.esriTransformDirection constant (in)
inPoints - The inPoints (in)
outPoints - The outPoints (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

transformPointsIF

public void transformPointsIF(int direction,
                              int[] inPoints,
                              double[][] outPoints)
                       throws IOException,
                              AutomationException
Transforms integer points to floating point points (or do the inverse).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
transformPointsIF in interface IAffineTransformation2D3GEN
Specified by:
transformPointsIF in interface ITransformationGEN
Parameters:
direction - A com.esri.arcgis.geometry.esriTransformDirection constant (in)
inPoints - The inPoints (in)
outPoints - The outPoints (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

transformPointsII

public void transformPointsII(int direction,
                              int[] inPoints,
                              int[][] outPoints)
                       throws IOException,
                              AutomationException
Transforms integer points to integer points (or do the inverse).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
transformPointsII in interface IAffineTransformation2D3GEN
Specified by:
transformPointsII in interface ITransformationGEN
Parameters:
direction - A com.esri.arcgis.geometry.esriTransformDirection constant (in)
inPoints - The inPoints (in)
outPoints - The outPoints (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSpatialReferenceByRef

public void setSpatialReferenceByRef(ISpatialReference sR)
                              throws IOException,
                                     AutomationException
The spatial reference in which this transformation is meaningful.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setSpatialReferenceByRef in interface IAffineTransformation2D
Specified by:
setSpatialReferenceByRef in interface IAffineTransformation2D3GEN
Parameters:
sR - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSpatialReference

public ISpatialReference getSpatialReference()
                                      throws IOException,
                                             AutomationException
The spatial reference in which this transformation is meaningful.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getSpatialReference in interface IAffineTransformation2D
Specified by:
getSpatialReference in interface IAffineTransformation2D3GEN
Returns:
A reference to a com.esri.arcgis.geometry.ISpatialReference
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

reset

public void reset()
           throws IOException,
                  AutomationException
Resets the tranformation.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
reset in interface IAffineTransformation2D
Specified by:
reset in interface IAffineTransformation2D3GEN
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

defineFromControlPoints

public void defineFromControlPoints(IPoint[] fromPoints,
                                    IPoint[] toPoints)
                             throws IOException,
                                    AutomationException
Defines the best affine transformation between two sets of points. Can be used to register paper maps on a digitizer.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
defineFromControlPoints in interface IAffineTransformation2D3GEN
Parameters:
fromPoints - A reference to a com.esri.arcgis.geometry.IPoint array (in)
toPoints - A reference to a com.esri.arcgis.geometry.IPoint array (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

defineFromEnvelopes

public void defineFromEnvelopes(IEnvelope from,
                                IEnvelope to)
                         throws IOException,
                                AutomationException
Defines a transformation that maps a point relative to one envelope to a similar position relative to another envelope.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
defineFromEnvelopes in interface IAffineTransformation2D
Specified by:
defineFromEnvelopes in interface IAffineTransformation2D3GEN
Parameters:
from - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
to - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

defineFromEnvelopesEx

public void defineFromEnvelopesEx(IEnvelope from,
                                  IEnvelope to,
                                  IEnvelope outFrom,
                                  boolean assumeFalseOrigin,
                                  boolean keepAspect,
                                  boolean flipIt)
                           throws IOException,
                                  AutomationException
Defines a transformation that maps a point relative to one envelope to a similar position relative to another envelope.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
defineFromEnvelopesEx in interface IAffineTransformation2D
Specified by:
defineFromEnvelopesEx in interface IAffineTransformation2D3GEN
Parameters:
from - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
to - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
outFrom - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
assumeFalseOrigin - The assumeFalseOrigin (in)
keepAspect - The keepAspect (in)
flipIt - The flipIt (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

defineReflection

public void defineReflection(ILine l)
                      throws IOException,
                             AutomationException
Defines a transformation that can perform a reflection about the line l.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
defineReflection in interface IAffineTransformation2D
Specified by:
defineReflection in interface IAffineTransformation2D3GEN
Parameters:
l - A reference to a com.esri.arcgis.geometry.ILine (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getRMSError

public void getRMSError(double[] fromError,
                        double[] toError)
                 throws IOException,
                        AutomationException
RMS (Root Mean Square) error expressed relative to the 'from' and 'to' points defining the transformation. These error terms are valid after using DefineFromControlPoints/Ex to define the transformation.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getRMSError in interface IAffineTransformation2D
Specified by:
getRMSError in interface IAffineTransformation2D3GEN
Parameters:
fromError - The fromError (in/out: use single element array)
toError - The toError (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getControlPointError

public void getControlPointError(int i,
                                 double[] fromError,
                                 double[] toError)
                          throws IOException,
                                 AutomationException
Returns the errors involved in moving control point i from the 'from' to 'to' system. These error terms are valid after using DefineFromControlPoints/Ex to define the transformation.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getControlPointError in interface IAffineTransformation2D
Specified by:
getControlPointError in interface IAffineTransformation2D3GEN
Parameters:
i - The i (in)
fromError - The fromError (in/out: use single element array)
toError - The toError (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getXScale

public double getXScale()
                 throws IOException,
                        AutomationException
The scale along the X axis.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getXScale in interface IAffineTransformation2D
Specified by:
getXScale in interface IAffineTransformation2D3GEN
Returns:
The sx
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getYScale

public double getYScale()
                 throws IOException,
                        AutomationException
The scale along the Y axis.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getYScale in interface IAffineTransformation2D
Specified by:
getYScale in interface IAffineTransformation2D3GEN
Returns:
The sy
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getXTranslation

public double getXTranslation()
                       throws IOException,
                              AutomationException
The translation along the X axis.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getXTranslation in interface IAffineTransformation2D
Specified by:
getXTranslation in interface IAffineTransformation2D3GEN
Returns:
The dx
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getYTranslation

public double getYTranslation()
                       throws IOException,
                              AutomationException
The translation along the Y axis.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getYTranslation in interface IAffineTransformation2D
Specified by:
getYTranslation in interface IAffineTransformation2D3GEN
Returns:
The dy
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getRotation

public double getRotation()
                   throws IOException,
                          AutomationException
The rotation angle. Will not be able if different x/y scale factors have been incorporated into the transformation.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getRotation in interface IAffineTransformation2D
Specified by:
getRotation in interface IAffineTransformation2D3GEN
Returns:
The r
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

scale

public void scale(double dx,
                  double dy)
           throws IOException,
                  AutomationException
Incorporates scale factors into the transformation.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
scale in interface IAffineTransformation2D
Specified by:
scale in interface IAffineTransformation2D3GEN
Parameters:
dx - The dx (in)
dy - The dy (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setMoveOrigin

public void setMoveOrigin(IPoint origin)
                   throws IOException,
                          AutomationException
The origin of accumulated transformations used when projecting an affine transformation to a different spatial reference system.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setMoveOrigin in interface IAffineTransformation2D
Specified by:
setMoveOrigin in interface IAffineTransformation2D3GEN
Parameters:
origin - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

moveVector

public void moveVector(ILine movementVector)
                throws IOException,
                       AutomationException
Performs an X and Y translation defined by a 2D vector.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
moveVector in interface IAffineTransformation2D
Specified by:
moveVector in interface IAffineTransformation2D3GEN
Parameters:
movementVector - A reference to a com.esri.arcgis.geometry.ILine (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

move

public void move(double dx,
                 double dy)
          throws IOException,
                 AutomationException
Incorporates a translation factor into the transformation.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
move in interface IAffineTransformation2D
Specified by:
move in interface IAffineTransformation2D3GEN
Parameters:
dx - The dx (in)
dy - The dy (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

rotate

public void rotate(double da)
            throws IOException,
                   AutomationException
Incorporates a rotation (in radians) into the transformation.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
rotate in interface IAffineTransformation2D
Specified by:
rotate in interface IAffineTransformation2D3GEN
Parameters:
da - The da (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

postMultiply

public void postMultiply(IAffineTransformation2D3GEN postTransform)
                  throws IOException,
                         AutomationException
Post-multiplies the transformation by another transformation.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
postMultiply in interface IAffineTransformation2D3GEN
Parameters:
postTransform - A reference to a com.esri.arcgis.geometry.IAffineTransformation2D3GEN (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

preMultiply

public void preMultiply(IAffineTransformation2D3GEN preTransform)
                 throws IOException,
                        AutomationException
Pre-multiplies the transformation by another transformation.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
preMultiply in interface IAffineTransformation2D3GEN
Parameters:
preTransform - A reference to a com.esri.arcgis.geometry.IAffineTransformation2D3GEN (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isReflective

public boolean isReflective()
                     throws IOException,
                            AutomationException
Indicates if the transformation contains a reflection (determinant is negative).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
isReflective in interface IAffineTransformation2D
Specified by:
isReflective in interface IAffineTransformation2D3GEN
Returns:
The isReflective
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

project

public void project(ISpatialReference newSpatialReference)
             throws IOException,
                    AutomationException
Moves this transformation into another spatial reference. If the transformations contains only translations, then use the MoveOrigin property to define an equivalent translation in the new spatial reference.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
project in interface IAffineTransformation2D
Specified by:
project in interface IAffineTransformation2D3GEN
Parameters:
newSpatialReference - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMoveOrigin

public IPoint getMoveOrigin()
                     throws IOException,
                            AutomationException
The origin of accumulated transformations used when projecting an affine transformation to a different spatial reference system.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getMoveOrigin in interface IAffineTransformation2D2
Specified by:
getMoveOrigin in interface IAffineTransformation2D3GEN
Returns:
A reference to a com.esri.arcgis.geometry.IPoint
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

defineConformalFromControlPoints

public void defineConformalFromControlPoints(IPoint[] fromPoints,
                                             IPoint[] toPoints)
                                      throws IOException,
                                             AutomationException
Defines the best conformal affine transformation between two sets of points. Can be used to register paper maps on a digitizer.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
defineConformalFromControlPoints in interface IAffineTransformation2D3GEN
Parameters:
fromPoints - A reference to a com.esri.arcgis.geometry.IPoint array (in)
toPoints - A reference to a com.esri.arcgis.geometry.IPoint array (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryLinearCoefficients

public void queryLinearCoefficients(int direction,
                                    double[][] params)
                             throws IOException,
                                    AutomationException
Returns the linear coefficients which define the two dimensional affine transformation. The array size of the incoming parameters needs to be 6.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
queryLinearCoefficients in interface IAffineTransformation2D3GEN
Parameters:
direction - A com.esri.arcgis.geometry.esriTransformDirection constant (in)
params - The params (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setLinearCoefficients

public void setLinearCoefficients(int direction,
                                  double[] params)
                           throws IOException,
                                  AutomationException
Sets the linear coefficients which define the two dimensional affine transformation. The array size of the incoming parameters needs to be 6.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setLinearCoefficients in interface IAffineTransformation2D3
Specified by:
setLinearCoefficients in interface IAffineTransformation2D3GEN
Parameters:
direction - A com.esri.arcgis.geometry.esriTransformDirection constant (in)
params - The params (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

transformMeasuresFF

public void transformMeasuresFF(int direction,
                                int cMeasures,
                                double[] inMeasures,
                                double[] outMeasures)
                         throws IOException,
                                AutomationException
Transforms floating point measures to floating point measures (or do the inverse).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
transformMeasuresFF in interface ITransformation
Parameters:
direction - A com.esri.arcgis.geometry.esriTransformDirection constant (in)
cMeasures - The cMeasures (in)
inMeasures - The inMeasures (in)
outMeasures - The outMeasures (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

transformMeasuresFI

public void transformMeasuresFI(int direction,
                                int cMeasures,
                                double[] inMeasures,
                                int[] outMeasures)
                         throws IOException,
                                AutomationException
Transforms floating point measures to integer measures (or do the inverse).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
transformMeasuresFI in interface ITransformation
Parameters:
direction - A com.esri.arcgis.geometry.esriTransformDirection constant (in)
cMeasures - The cMeasures (in)
inMeasures - The inMeasures (in)
outMeasures - The outMeasures (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

transformMeasuresIF

public void transformMeasuresIF(int direction,
                                int cMeasures,
                                int[] inMeasures,
                                double[] outMeasures)
                         throws IOException,
                                AutomationException
Transforms integer measures to floating point measures (or do the inverse).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
transformMeasuresIF in interface ITransformation
Parameters:
direction - A com.esri.arcgis.geometry.esriTransformDirection constant (in)
cMeasures - The cMeasures (in)
inMeasures - The inMeasures (in)
outMeasures - The outMeasures (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

transformMeasuresII

public void transformMeasuresII(int direction,
                                int cMeasures,
                                int[] inMeasures,
                                int[] outMeasures)
                         throws IOException,
                                AutomationException
Transforms integer measures to integer measures (or do the inverse).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
transformMeasuresII in interface ITransformation
Parameters:
direction - A com.esri.arcgis.geometry.esriTransformDirection constant (in)
cMeasures - The cMeasures (in)
inMeasures - The inMeasures (in)
outMeasures - The outMeasures (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

transformPointsFF

public void transformPointsFF(int direction,
                              int cPoints,
                              double[] inPoints,
                              double[] outPoints)
                       throws IOException,
                              AutomationException
Transforms floating point points to floating point points (or do the inverse).

Remarks

The cPoints parameter is the number of points you wish to transform. inPoints and outPoints are one-dimensional arrays so you must interleave coordinate pairs into the arrays.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
transformPointsFF in interface ITransformation
Parameters:
direction - A com.esri.arcgis.geometry.esriTransformDirection constant (in)
cPoints - The cPoints (in)
inPoints - The inPoints (in)
outPoints - The outPoints (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

transformPointsFI

public void transformPointsFI(int direction,
                              int cPoints,
                              double[] inPoints,
                              int[] outPoints)
                       throws IOException,
                              AutomationException
Transforms floating point points to integer points (or do the inverse).

Remarks

The cPoints parameter is the number of points you wish to transform. inPoints and outPoints are one-dimensional arrays so you must interleave coordinate pairs into the arrays.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
transformPointsFI in interface ITransformation
Parameters:
direction - A com.esri.arcgis.geometry.esriTransformDirection constant (in)
cPoints - The cPoints (in)
inPoints - The inPoints (in)
outPoints - The outPoints (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

transformPointsIF

public void transformPointsIF(int direction,
                              int cPoints,
                              int[] inPoints,
                              double[] outPoints)
                       throws IOException,
                              AutomationException
Transforms integer points to floating point points (or do the inverse).

Remarks

The cPoints parameter is the number of points you wish to transform. inPoints and outPoints are one-dimensional arrays so you must interleave coordinate pairs into the arrays.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
transformPointsIF in interface ITransformation
Parameters:
direction - A com.esri.arcgis.geometry.esriTransformDirection constant (in)
cPoints - The cPoints (in)
inPoints - The inPoints (in)
outPoints - The outPoints (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

transformPointsII

public void transformPointsII(int direction,
                              int cPoints,
                              int[] inPoints,
                              int[] outPoints)
                       throws IOException,
                              AutomationException
Transforms integer points to integer points (or do the inverse).

Remarks

The cPoints parameter is the number of points you wish to transform. inPoints and outPoints are one-dimensional arrays so you must interleave coordinate pairs into the arrays.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
transformPointsII in interface ITransformation
Parameters:
direction - A com.esri.arcgis.geometry.esriTransformDirection constant (in)
cPoints - The cPoints (in)
inPoints - The inPoints (in)
outPoints - The outPoints (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

defineFromControlPoints

public void defineFromControlPoints(int numPoints,
                                    IPoint fromPoints,
                                    IPoint toPoints)
                             throws IOException,
                                    AutomationException
Defines the best affine transformation between two sets of points. Can be used to register paper maps on a digitizer.

Description

The DefineFromControlPoints method may be particularly useful if you wish to register a set of control points from a digitizer to existing known control points. This method calculates a ‘best fit’ affine transformation to map one set of control points onto another. Please see the AffineTransformation2D coclass for a description of the mathematical model.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
defineFromControlPoints in interface IAffineTransformation2D
Parameters:
numPoints - The numPoints (in)
fromPoints - A reference to a com.esri.arcgis.geometry.IPoint (in)
toPoints - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

postMultiply

public void postMultiply(IAffineTransformation2D postTransform)
                  throws IOException,
                         AutomationException
Post-multiplies the transformation by another transformation.

Description

Multiplies the existing affine transformation matrix with another affine transformation matrix. The multiplication occurs after the existing transformation is applied. This is a right side matrix multiplication.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
postMultiply in interface IAffineTransformation2D
Parameters:
postTransform - A reference to a com.esri.arcgis.geometry.IAffineTransformation2D (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

preMultiply

public void preMultiply(IAffineTransformation2D preTransform)
                 throws IOException,
                        AutomationException
Pre-multiplies the transformation by another transformation.

Description

Multiplies the existing affine transformation matrix with another affine transformation matrix. The multiplication occurs after the other transformation is first applied. This is a left side matrix multiplication.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
preMultiply in interface IAffineTransformation2D
Parameters:
preTransform - A reference to a com.esri.arcgis.geometry.IAffineTransformation2D (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

defineConformalFromControlPoints

public void defineConformalFromControlPoints(int numPoints,
                                             IPoint fromPoints,
                                             IPoint toPoints)
                                      throws IOException,
                                             AutomationException
Defines the best conformal affine transformation between two sets of points. Can be used to register paper maps on a digitizer.

Description

The DefineConformalFromControlPoints method allows defining a Conformal Transformation based on control points arrays. Please see the AffineTransformation2D coclass for a description of the mathematical model.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
defineConformalFromControlPoints in interface IAffineTransformation2D3
Parameters:
numPoints - The numPoints (in)
fromPoints - A reference to a com.esri.arcgis.geometry.IPoint (in)
toPoints - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryLinearCoefficients

public void queryLinearCoefficients(int direction,
                                    double[] params)
                             throws IOException,
                                    AutomationException
Returns the linear coefficients which define the two dimensional affine transformation.

Description

The QueryLinearCoefficients method allows to get the linear coefficients (a, b, c, d, e, f) for the current Affine Transformation. Please see the AffineTransformation2D coclass for a description of the mathematical model. The array will contain the parameters in alphabetical order.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
queryLinearCoefficients in interface IAffineTransformation2D3
Parameters:
direction - A com.esri.arcgis.geometry.esriTransformDirection constant (in)
params - The params (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

esri_clone

public IClone esri_clone()
                  throws IOException,
                         AutomationException
Clones the receiver and assigns the result to *clone.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
esri_clone in interface IClone
Returns:
A reference to a com.esri.arcgis.system.IClone
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

assign

public void assign(IClone src)
            throws IOException,
                   AutomationException
Assigns the properties of src to the receiver.

Description

Use Assign method to assign the properties of source object to receiver object. Both objects need to have the same CLSIDs. Both source and receiver objects need to be instantiated.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
assign in interface IClone
Parameters:
src - A reference to a com.esri.arcgis.system.IClone (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isEqual

public boolean isEqual(IClone other)
                throws IOException,
                       AutomationException
Indicates if the receiver and other have the same properties.

Description

IsEqual returns True if the receiver and the source have the same properties. Note, this does not imply that the receiver and the source reference the same object.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
isEqual in interface IClone
Parameters:
other - A reference to a com.esri.arcgis.system.IClone (in)
Returns:
The equal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isIdentical

public boolean isIdentical(IClone other)
                    throws IOException,
                           AutomationException
Indicates if the receiver and other are the same object.

Description

IsIdentical returns true if the receiver and the source reference the same object.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
isIdentical in interface IClone
Parameters:
other - A reference to a com.esri.arcgis.system.IClone (in)
Returns:
The identical
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

interfaceSupportsErrorInfo

public void interfaceSupportsErrorInfo(GUID riid)
                                throws IOException,
                                       AutomationException
interfaceSupportsErrorInfo

Description

Indicates whether the interface supports IErrorInfo.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
interfaceSupportsErrorInfo in interface ISupportErrorInfo
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

putZShift

public void putZShift(double zOrigin,
                      double zOffset)
               throws IOException,
                      AutomationException
The shift in the Z direction.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
putZShift in interface IZShift
Parameters:
zOrigin - The zOrigin (in)
zOffset - The zOffset (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getZShift

public void getZShift(double[] zOrigin,
                      double[] zOffset)
               throws IOException,
                      AutomationException
The shift in the Z direction.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getZShift in interface IZShift
Parameters:
zOrigin - The zOrigin (out: use single element array)
zOffset - The zOffset (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.