This document is archived and information here might be outdated.  Recommended version.


IAffineTransformation2D.DefineFromControlPoints Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Geometry)  

IAffineTransformation2D.DefineFromControlPoints Method

Defines the best affine transformation between two sets of points. Can be used to register paper maps on a digitizer.

[Visual Basic .NET]
Public Sub DefineFromControlPoints ( _
    ByVal numPoints As Integer, _
    ByRef fromPoints As IPoint, _
    ByRef toPoints As IPoint _
)
[C#]
public void DefineFromControlPoints (
    int numPoints,
    ref IPoint fromPoints,
    ref IPoint toPoints
);
[C++]
HRESULT DefineFromControlPoints(
  long numPoints,
  IPoint** fromPoints,
  IPoint** toPoints
);
[C++]

Parameters numPoints numPoints is a parameter of type long fromPoints [in]
fromPoints is a parameter of type IPoint toPoints [in]
toPoints is a parameter of type IPoint

Product Availability

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

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.

Errors Returned

A minimum of 3 points are needed.  If this condition is not met, the error E_GEOMETRY_INSUFFICIENT_CONTROLPOINTS is returned.

See Also

IAffineTransformation2D Interface