com.esri.arcgis.geometry
Interface ITransform2D

All Superinterfaces:
Serializable
All Known Implementing Classes:
BezierCurve, BmpPictureElement, CircleElement, CircularArc, DataGraphTElement, DimensionShape, EllipseElement, EllipticArc, EmfPictureElement, Envelope, FrameElement, GeometryBag, GifPictureElement, GroupElement, ImgPictureElement, InkGraphic, Jp2PictureElement, JpgPictureElement, Line, LineElement, MapFrame, MapSurroundFrame, MarkerElement, MultiPatch, MultiPatchElement, Multipoint, OleFrame, ParagraphTextElement, Path, PictureElement, PMFTitleTextElement, PngPictureElement, Point, Polygon, PolygonElement, Polyline, RectangleElement, Ring, SidPictureElement, Text3DElement, TextElement, TifPictureElement, TriangleFan, Triangles, TriangleStrip

public interface ITransform2D
extends Serializable

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

When To Use

ITransform2D is a generic interface implemented by most elements and geometries (i.e., CircleElement, FrameElement, Point, Line, Polygon, etc.). Use this interface when you want to update the position of the element or geometry through some type of Euclidan 2D transformation opertion (move, rotate, scale, or transform).

Product Availability

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


Method Summary
 void move(double dx, double dy)
          Moves dx units horizontally and dy units vertically.
 void moveVector(ILine v)
          Moves a direction and distance v.
 void rotate(IPoint origin, double rotationAngle)
          Rotates about the specified origin point.
 void scale(IPoint origin, double sx, double sy)
          Scales about the specified origin using seperate horizonal and vertical scales.
 void transform(int direction, ITransformation transformation)
          Applies an arbitrary transformation.
 

Method Detail

move

void move(double dx,
          double dy)
          throws IOException,
                 AutomationException
Moves dx units horizontally and dy units vertically.

Description

Moves the Geometry dX units along the X-Axis and dY units along the Y-Axis. Only changes the position of the Geometry without altering any of the other characteristics. Move is a spatial offset.

Remarks

Transform2D Move Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

moveVector

void moveVector(ILine v)
                throws IOException,
                       AutomationException
Moves a direction and distance v. v can be in a different spatial reference than the geometry being moved.

Description

Moves the Geometry dX units along the X-Axis and dY units along the Y-Axis, where dX and dY are calculated from the input vector Line. Only the Length and Angle of the vector affect the transformation. The location of the vector does not change the transformation. Only changes the position of the Geometry without altering any of the other characteristics. Move is a spatial offset.

Remarks

Transform2D MoveVector Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
v - 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.

scale

void scale(IPoint origin,
           double sx,
           double sy)
           throws IOException,
                  AutomationException
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.

Description

Stretches the Geometry a factor of sX along the X-Axis and a factor of sY along the Y-Axis (where sX is the ratio of Old Width to New Width, and sY is the ratio of Old Height to New Height). The Origin point is the reference Point from which the transformation is performed (Regardless of the location of the Origin point, the Geometry resulting from the transformation is the same, except for a positional offset). The Origin is the only point in the transformation guaranted to remain in the same location after the transformation is complete.

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

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
origin - A reference to a com.esri.arcgis.geometry.IPoint (in)
sx - The sx (in)
sy - The sy (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

rotate

void rotate(IPoint origin,
            double rotationAngle)
            throws IOException,
                   AutomationException
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.

Description

Rotate performs an angular transform (rotation) on the Geometry. The Origin is the only point in the transformation guaranteed to remain in the same location after the transformation is performed. Regardless of the Origin, the transformed Geometry is the same, except for a positional offset. The RotationAngle is measured in radians.

Remarks

An Envelope cannot be Rotated.

Transform2D Rotate Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
origin - A reference to a com.esri.arcgis.geometry.IPoint (in)
rotationAngle - The rotationAngle (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

transform

void transform(int direction,
               ITransformation transformation)
               throws IOException,
                      AutomationException
Applies an arbitrary transformation. In particular, the transformation parameter can be either an affine transformation or a geographic transformation (datum shift).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
direction - A com.esri.arcgis.geometry.esriTransformDirection constant (in)
transformation - A reference to a com.esri.arcgis.geometry.ITransformation (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.