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


ISpatialReferenceFactory.CreateDatum 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.CreateDatum Method
ArcGIS Developer Help

ISpatialReferenceFactory.CreateDatum Method

Creates a predefined datum.

[Visual Basic .NET]
Public Function CreateDatum ( _
    ByVal datumType As Integer _
) As IDatum
[C#]
public IDatum CreateDatum (
    int datumType
);
[C++]
HRESULT CreateDatum(
  long datumType
);
[C++]
Parameters
datumType 

datumType is a parameter of type long

Product Availability

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

Description

Use an element from the esriSRDatumType, esriSRDatum2Type, or esriSRDatum3Type enumerations as the datumType to create a particular predefined horizontal datum.

[C#]
ISpatialReferenceFactory spatialReferenceFactory = new SpatialReferenceEnvironmentClass(); 
//Create the datum using the available datums. These can be 
//found in the esriGeometry esriSRDatumType enumeration. 
IDatum datum = spatialReferenceFactory.CreateDatum((int)esriSRDatumType.esriSRDatum_NAD1983);
[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 pDatum As IDatum 

'Create the datum using the available datums. These can be 
'found in the esriGeometry esriSRDatumType enumeration. 

pDatum = pSpatRefFact.CreateDatum(ESRI.ArcGIS.Geometry.esriSRDatumType.esriSRDatum_NAD1983) 


See Also

ISpatialReferenceFactory Interface | esriSRDatumType Constants | esriSRDatum2Type Constants | esriSRDatum3Type Constants