This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IS > ISpatialReferenceFactory Interface > ISpatialReferenceFactory.CreateDatum Method (ArcObjects .NET 10.5 SDK) |
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
Use an element from the esriSRDatumType, esriSRDatum2Type, or esriSRDatum3Type enumerations as the datumType to create a particular predefined horizontal datum.
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);
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