This document is archived and information here might be outdated. Recommended version. |
Transforms floating point points to floating point points (or do the inverse).
[Visual Basic .NET] Public Sub TransformPointsFF ( _ ByVal Direction As esriTransformDirection, _ ByVal cPoints As Integer, _ ByRef inPoints As Double, _ ByRef outPoints As Double _ )
[C#] public void TransformPointsFF ( esriTransformDirection Direction, int cPoints, ref double inPoints, ref double outPoints );
[C++]
HRESULT TransformPointsFF(
esriTransformDirection Direction,
long cPoints,
System.Double* inPoints,
System.Double* outPoints
);
[C++]
Parameters Direction
Direction is a parameter of type esriTransformDirection cPoints
cPoints is a parameter of type long inPoints
inPoints is a parameter of type double* outPoints
outPoints is a parameter of type double*
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.
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. This code is a shift of the points to the east and north.
IAffineTransformation2D transform=new AffineTransformation2D() as IAffineTransformation2D;
//Sets the type of transformation moving the values 10 degrees East and 20 degrees North
transform.Move(10, 20);
//Create two single dimensioned arrays for the inPoints and OutPoints
double[] inPoints=new double[4];
double[] outPoints=new double[4];
//Interleave the Longitude and Latitude value for two points 1.1E 5.2N, 2.3E 6.4N
inPoints[0]=1.1; //Longitude point 1
inPoints[1]=5.2; //Latitude point 1
inPoints[2]=2.3; //Longitude point 2
inPoints[3]=6.4; //Latitude point 2
transform.TransformPointsFF(0,2,ref inPoints[0],ref outPoints[0]);
Debug.Print(outPoints[0].ToString()); //11.1
Debug.Print(outPoints[1].ToString()); //25.2
Debug.Print(outPoints[2].ToString()); //12.3
Debug.Print(outPoints[3].ToString()); //26.4