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


ISpatialReferenceFactory3.CreateVerticalDatum Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Geometry)  

ISpatialReferenceFactory3.CreateVerticalDatum Method

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

Product Availability

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

Description

Use an element from the esriSRVerticalDatumType enumeration as the vdID to create a particular predefined vertical datum.

[C#]

    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);
    }

See Also

ISpatialReferenceFactory3 Interface

.NET Related Topics

Creating a custom vertical coordinate system | Creating a predefined vertical coordinate system