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


ISpatialReferenceFactory.CreateGeoTransformation Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IS > ISpatialReferenceFactory Interface > ISpatialReferenceFactory.CreateGeoTransformation Method
ArcGIS Developer Help

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
);
[C++]
Parameters
gTransformationType 

gTransformationType is a parameter of type long

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