ArcObjects Library Reference (Geometry)  

IVerticalCoordinateSystemEdit.Define Method

Defines the properties of a vertical coordinate system.

[Visual Basic .NET]
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] _
)
[C#]
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
);
[C#]

Optional Values

Name   To indicate that this parameter is undefined, first define a variable object Missing = Type.Missing; then pass this in as ref Missing.
Alias   To indicate that this parameter is undefined, first define a variable object Missing = Type.Missing; then pass this in as ref Missing.
Abbreviation   To indicate that this parameter is undefined, first define a variable object Missing = Type.Missing; then pass this in as ref Missing.
Remarks   To indicate that this parameter is undefined, first define a variable object Missing = Type.Missing; then pass this in as ref Missing.
useage   To indicate that this parameter is undefined, first define a variable object Missing = Type.Missing; then pass this in as ref Missing.
hvDatum   To indicate that this parameter is undefined, first define a variable object Missing = Type.Missing; then pass this in as ref Missing.
projectedUnit   To indicate that this parameter is undefined, first define a variable object Missing = Type.Missing; then pass this in as ref Missing.
VerticalShift   To indicate that this parameter is undefined, first define a variable object Missing = Type.Missing; then pass this in as ref Missing.
PositiveDirection   To indicate that this parameter is undefined, first define a variable object Missing = Type.Missing; then pass this in as ref Missing.
[C++]
HRESULT Define(
  VARIANT* Name,
  VARIANT* Alias,
  VARIANT* Abbreviation,
  VARIANT* Remarks,
  VARIANT* useage,
  VARIANT* hvDatum,
  VARIANT* projectedUnit,
  VARIANT* VerticalShift,
  VARIANT* PositiveDirection
);
[C++]

Parameters

Name [optional]   Name is a parameter of type VARIANT

  To indicate this parameter is undefined pass a reference to a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND.

Alias [optional]   Alias is a parameter of type VARIANT

  To indicate this parameter is undefined pass a reference to a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND.

Abbreviation [optional]   Abbreviation is a parameter of type VARIANT

  To indicate this parameter is undefined pass a reference to a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND.

Remarks [optional]   Remarks is a parameter of type VARIANT

  To indicate this parameter is undefined pass a reference to a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND.

useage [optional]   useage is a parameter of type VARIANT

  To indicate this parameter is undefined pass a reference to a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND.

hvDatum [optional]   hvDatum is a parameter of type VARIANT

  To indicate this parameter is undefined pass a reference to a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND.

projectedUnit [optional]   projectedUnit is a parameter of type VARIANT

  To indicate this parameter is undefined pass a reference to a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND.

VerticalShift [optional]   VerticalShift is a parameter of type VARIANT

  To indicate this parameter is undefined pass a reference to a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND.

PositiveDirection [optional]   PositiveDirection is a parameter of type VARIANT

  To indicate this parameter is undefined pass a reference to a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND.

Product Availability

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

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.

[C#]

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

See Also

IVerticalCoordinateSystemEdit Interface

.NET Related Topics

Creating a custom vertical coordinate system |