ArcObjects Library Reference (Geometry)  

ISpatialReferenceFactory3.CreateVerticalCoordinateSystem Method

Creates a predefined vertical coordinate system from an enumeration or ID code.

[Visual Basic .NET]
Public Function CreateVerticalCoordinateSystem ( _
    ByVal vcsID As Integer _
) As IVerticalCoordinateSystem
[C#]
public IVerticalCoordinateSystem CreateVerticalCoordinateSystem (
    int vcsID
);
[C++]
HRESULT CreateVerticalCoordinateSystem(
  long vcsID,
  IVerticalCoordinateSystem** VerticalCoordinateSystem
);
[C++]

Parameters

vcsID   vcsID is a parameter of type long VerticalCoordinateSystem [out, retval]

  VerticalCoordinateSystem is a parameter of type IVerticalCoordinateSystem

Product Availability

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

Description

Use an element from the esriSRVerticalCSType enumeration as the VerticalCSType to create a particular predefined vertical coordinate system.

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


[Visual Basic .NET]

        Dim pSRF As ISpatialReferenceFactory3
        pSRF = New SpatialReferenceEnvironment

        Dim pVCS As IVerticalCoordinateSystem
        Dim pGCS As IGeographicCoordinateSystem2
        Dim pSpatialReference3 As ISpatialReference3

        pGCS = pSRF.CreateGeographicCoordinateSystem(esriSRGeoCSType.esriSRGeoCS_NAD1927)
        pSpatialReference3 = pGCS
        pVCS = pSRF.CreateVerticalCoordinateSystem(esriSRVerticalCSType.esriSRVertCS_NAVD1988)
        pSpatialReference3.VerticalCoordinateSystem = pVCS

        Dim pVCS2 As IVerticalCoordinateSystem
        pVCS2 = pSpatialReference3.VerticalCoordinateSystem

See Also

ISpatialReferenceFactory3 Interface