This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IS > ISpatialReferenceFactory3 Interface > ISpatialReferenceFactory3.CreateVerticalDatum Method (ArcObjects .NET 10.4 SDK) |
Creates a predefined vertical datum from an enumeration or ID code.
[Visual Basic .NET] Public Function CreateVerticalDatum ( _ ByVal vdID As Integer _ ) As IVerticalDatum
[C#] public IVerticalDatum CreateVerticalDatum ( int vdID );
[C++]
HRESULT CreateVerticalDatum(
long vdID,
IVerticalDatum** VerticalDatum
);
[C++]
Parameters vdID vdID is a parameter of type long VerticalDatum [out, retval]
VerticalDatum is a parameter of type IVerticalDatum
Use an element from the esriSRVerticalDatumType enumeration as the vdID to create a particular predefined vertical datum.
private void CreateVerticalReferenceSystem()
{
// use activator class with SpatialReferenceEnvironment singleton
Type factoryType=Type.GetTypeFromProgID("esriGeometry.SpatialReferenceEnvironment");
System.Object obj=Activator.CreateInstance(factoryType);
ISpatialReferenceFactory3 spatialReferenceFactory=obj as ISpatialReferenceFactory3;
// Dimension a vertical datum and vertical coordinate system
// Use the enumerations to create instances of the predefined objects
IVerticalDatum verticalDatum=spatialReferenceFactory.CreateVerticalDatum((int)esriSRVerticalDatumType.esriSRVertDatum_Alicante);
IVerticalCoordinateSystem verticalCoordinateSystem=spatialReferenceFactory.CreateVerticalCoordinateSystem((int)esriSRVerticalCSType.esriSRVertCS_Alicante);
}