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


ISpatialReferenceFactory.CreateGeoTransformation Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Geometry)  

ISpatialReferenceFactory.CreateGeoTransformation Method

Creates a predefined transformation between geographic coordinate systems.

[Visual Basic .NET]
Public Function CreateGeoTransformation ( _
    ByVal gTransformationType As Integer _
) As ITransformation
[C#]
public ITransformation CreateGeoTransformation (
    int gTransformationType
);
[C++]
HRESULT CreateGeoTransformation(
  long gTransformationType,
  ITransformation** GeoTransformation
);
[C++]

Parameters gTransformationType gTransformationType is a parameter of type long GeoTransformation [out, retval]
GeoTransformation is a parameter of type ITransformation

Product Availability

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

Description

Use an element from the esriSRGeoTransformationType, esriSRGeoTransformation2Type, or esriSRGeoTransformation3Type enumerations as the gTransformationType to create a particular predefined geographic (datum) transformation.

[C#]

            ISpatialReferenceFactory spatialReferenceFactory=new SpatialReferenceEnvironmentClass();
            //Create a geographic (datum) transformation using the predefined geographic
            //transformations. These can be found in the esriGeometry esriSRGeoTransformationType
            //and esriSRGeoTransformation2Type enumerations.
            IGeoTransformation geoTransformation=spatialReferenceFactory.CreateGeoTransformation((int)esriSRGeoTransformation2Type.esriSRGeoTransformation_NAD_1983_TO_HARN_MO) as IGeoTransformation;

[Visual Basic .NET]

        Dim pSpatRefFact As ESRI.ArcGIS.Geometry.ISpatialReferenceFactory
        'Set the spatial reference factory to a new spatial reference environment
        pSpatRefFact=New ESRI.ArcGIS.Geometry.SpatialReferenceEnvironment

        Dim pGeoTran As ESRI.ArcGIS.Geometry.IGeoTransformation

        'Create a geographic (datum) transformation using the predefined geographic
        'transformations. These can be found in the esriGeometry esriSRGeoTransformationType
        'and esriSRGeoTransformation2Type enumerations.

        pGeoTran=pSpatRefFact.CreateGeoTransformation(ESRI.ArcGIS.Geometry.esriSRGeoTransformation2Type.esriSRGeoTransformation_NAD_1983_TO_HARN_MO)

See Also

ISpatialReferenceFactory Interface | esriSRGeoTransformationType Constants | esriSRGeoTransformation2Type Constants | esriSRGeoTransformation3Type Constants

.NET Related Topics

Creating a predefined geotransformation