Interface ITransform2D

Namespace
ESRI.ArcGIS.Geometry
Assembly
ESRI.Server.Geometry.dll

Provides access to methods for transforming geometries using either specific parameters or arbitrary transformation objects (affine transformations, geographic transformations, etc.).

[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("3BE78AD0-886E-11D1-BC78-0000F875BCCE")]
public interface ITransform2D

Methods

Move(double, double)

Moves dx units horizontally and dy units vertically.

void Move(double dx, double dy)

Parameters

dx double
dy double

Remarks

 

Transform2D Move Example

MoveVector(ILine)

Moves a direction and distance v. v can be in a different spatial reference than the geometry being moved.

void MoveVector(ILine v)

Parameters

v ILine

Remarks

 

Transform2D MoveVector Example

Rotate(IPoint, double)

Rotates about the specified origin point. The angle is in radians. The origin can be in a different spatial reference than the geometry being rotated.

void Rotate(IPoint Origin, double rotationAngle)

Parameters

Origin IPoint
rotationAngle double

Remarks

An Envelope cannot be Rotated.

Transform2D Rotate Example

Scale(IPoint, double, double)

Scales about the specified origin using seperate horizonal and vertical scales. The origin point can be in a different spatial reference than the geometry being scaled.

void Scale(IPoint Origin, double sx, double sy)

Parameters

Origin IPoint
sx double
sy double

Remarks

Note: Caution must be taken when scaling a CircularArc or a geometry containing CircularArc segments.  Unless Abs(ScaleX) = Abs(ScaleY), the resulting CircularArcs will not retain the characteristics of the original geometry (since they remain CircularArcs).

Scale Example

[C#]

            //Create Point you wish to scale
            IPoint startingPoint = new PointClass() as IPoint;
            startingPoint.PutCoords(10, 10);
            //Create a point to act as origin
            IPoint origin = new PointClass() as IPoint;
            origin.PutCoords(15, 15);
            //Cast the startingPoint into the correct Interface
            ITransform2D transformScalePoint = startingPoint as ITransform2D;
            //Perform Scale
            transformScalePoint.Scale(origin, .5, .5);
            double x;
            double y;
            startingPoint.QueryCoords(out x, out y);
            Debug.Print(x.ToString());
            Debug.Print(y.ToString());













Transform(esriTransformDirection, ITransformation)

Applies an arbitrary transformation. In particular, the transformation parameter can be either an affine transformation or a geographic transformation (datum shift).

void Transform(esriTransformDirection Direction, ITransformation Transformation)

Parameters

Direction esriTransformDirection
Transformation ITransformation