ArcObjects Library Reference (Geometry)  

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,
  IDatum** Datum
);
[C++]

Parameters

datumType   datumType is a parameter of type long Datum [out, retval]

  Datum is a parameter of type IDatum

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

.NET Related Topics

Creating a custom geographic coordinate system | Creating a custom vertical coordinate system | Geometry