IVerticalCoordinateSystemEdit Interface

Provides access to members that control the properties of a vertical coordinate system.

Description

A vertical coordinate system has two types. It can either be gravity-related, which requires a VerticalDatum; or ellipsoid/spheroid-based which requires a horizontal Datum. A horizontal Datum is the same as one used for a geographic coordinate system. You will also need a (linear) projectedUnit object. A VCS has two parameters. The positiveDirection value defines whether the vertical coordinate system has positive values 'up', heights, or 'down', depths. Use -1 for positive depths. The verticalShift parameter is a way to identify this VCS as offset from some other known surface. For example, you might know that a dataset's depths are referenced to mean lower low water (a tidal level). You might also know that for this dataset, mean lower low water is 1.23 meters below local mean sea level. The VCS could be defined for mean sea level but with a verticalShift of -1.23.

Members

Name Description
Method Define Defines the properties of a vertical coordinate system.
Method DefineEx Defines the properties of a vertical coordinate system.

IVerticalCoordinateSystemEdit.Define Method

Defines the properties of a vertical coordinate system.

Public Sub Define ( _
    [ByRef Name As Object], _
    [ByRef Alias As Object], _
    [ByRef Abbreviation As Object], _
    [ByRef Remarks As Object], _
    [ByRef useage As Object], _
    [ByRef hvDatum As Object], _
    [ByRef projectedUnit As Object], _
    [ByRef VerticalShift As Object], _
    [ByRef PositiveDirection As Object] _
)
public void Define (
    ref object Name,
    ref object Alias,
    ref object Abbreviation,
    ref object Remarks,
    ref object useage,
    ref object hvDatum,
    ref object projectedUnit,
    ref object VerticalShift,
    ref object PositiveDirection
);

Description

The Define method allows you to create a custom vertical coordinate system (VCS). You can use ISpatialReferenceFactory3 to create the predefined objects you need to define a VCS or use the various Edit interfaces to create custom objects.

A vertical coordinate system has two types. It can either be gravity-related, which requires a VerticalDatum; or ellipsoid/spheroid-based which requires a horizontal Datum. A horizontal Datum is the same as one used for a geographic coordinate system. You will also need a (linear) projectedUnit object. A VCS has two parameters. The positiveDirection value defines whether the vertical coordinate system has positive values 'up', heights, or 'down', depths. Use -1 for positive depths. The verticalShift parameter is a way to identify this VCS as offset from some other known surface. For example, you might know that a dataset's depths are referenced to mean lower low water (a tidal level). You might also know that for this dataset, mean lower low water is 1.23 meters below local mean sea level. The VCS could be defined for mean sea level but with a verticalShift of -1.23.

private IVerticalCoordinateSystem CreateEllipsedBasedVerticalCoordinateSystem()

    {

        //Creates an ellipsoid-based vertical coordinate system

        // use activator class with SpatialReferenceEnvironment singleton

        Type factoryType = Type.GetTypeFromProgID("esriGeometry.SpatialReferenceEnvironment");

        System.Object obj = Activator.CreateInstance(factoryType);

        ISpatialReferenceFactory3 spatialReferenceFactory = obj as ISpatialReferenceFactory3;

        IDatum datum = spatialReferenceFactory.CreateDatum((int)esriSRDatumType.esriSRDatum_WGS1984);

        //Because a VCS can be based upon Datum or VerticalDatum, IHVDatum is used 

        //when defining a vertical coordinate system.

        IHVDatum hvDatum = datum as IHVDatum;

        ILinearUnit linearUnit = spatialReferenceFactory.CreateUnit((int)esriSRUnitType.esriSRUnit_Foot) as ILinearUnit;

        //Direction is again positive down, while the vertical shift is 0.4839

        IVerticalCoordinateSystemEdit verticalCoordinateSystemEdit = new VerticalCoordinateSystemClass();

        object name = "WGS84 vcs";

        object alias = "WGS84 ellipsoid";

        object abbreviation = "w84 3d";

        object remarks = "WGS84 ell-based vcs";

        object usage = "everywhere!";

        object hvDatumObject = hvDatum as object;

        object unitObject = linearUnit as object;

        object verticalShift = 0.4839 as object;

        object positiveDirection = -1 as object;

        verticalCoordinateSystemEdit.Define(ref name,

                                            ref alias,

                                            ref abbreviation,

                                            ref remarks,

                                            ref usage,

                                            ref hvDatumObject,

                                            ref unitObject,

                                            ref verticalShift,

                                            ref positiveDirection);

        IVerticalCoordinateSystem verticalCoordinateSystem = verticalCoordinateSystemEdit as IVerticalCoordinateSystem;

        return verticalCoordinateSystem;

    }

IVerticalCoordinateSystemEdit.DefineEx Method

Defines the properties of a vertical coordinate system.

Public Sub DefineEx ( _
    ByVal Name As String, _
    ByVal Alias As String, _
    ByVal Abbreviation As String, _
    ByVal Remarks As String, _
    ByVal useage As String, _
    ByVal pDatum As IHVDatum, _
    ByVal projectedXYUnit As ILinearUnit, _
    ByRef VerticalShift As Double, _
    ByRef PositiveDirection As Integer _
)
public void DefineEx (
    string Name,
    string Alias,
    string Abbreviation,
    string Remarks,
    string useage,
    IHVDatum pDatum,
    ILinearUnit projectedXYUnit,
    ref double VerticalShift,
    ref int PositiveDirection
);

Classes that implement IVerticalCoordinateSystemEdit

Classes Description
VerticalCoordinateSystem Creates a vertical coordinate system.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.