This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IS > ISpatialReferenceFactory Interface > ISpatialReferenceFactory.CreateGeoTransformation Method (ArcObjects .NET 10.4 SDK) |
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
Use an element from the esriSRGeoTransformationType, esriSRGeoTransformation2Type, or esriSRGeoTransformation3Type enumerations as the gTransformationType to create a particular predefined geographic (datum) transformation.
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;
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)
ISpatialReferenceFactory Interface | esriSRGeoTransformationType Constants | esriSRGeoTransformation2Type Constants | esriSRGeoTransformation3Type Constants