Represents a linear, angular, or area unit of measure used by a Geometry or CoordinateSystem, or in measurement or measurement conversion functions.

Namespace:  ESRI.ArcGISExplorer.Geometry

Assembly:  ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)

Syntax

C#
public sealed class Unit
Visual Basic (Declaration)
Public NotInheritable Class Unit

Remarks

Each instance of the Unit class represents a specific unit of measurement, and measure either linear, angular, or area values. Projected coordinate systems use linear units, and geographical coordinate systems use angular units; area units are used in various methods, for example Unit.Convert and GeodesicUtilities.Area. The UnitType property indicates which type of measurement units are represented by a Unit object.

The units of measurement used by a CoordinateSystem are accessible via the CoordinateSystem.Unit property; you can navigate down to the units of a Map, Layer, Column or Geometry as they all have a CoordinateSystem property.

Units are often retrieved from the CoordinateSystem of the appropriate one of these objects; however you can create new Unit objects by using either of the following methods:

Examples

The code below uses the Unit property of a CoordinateSystem and the GetPluralName method of Unit to build a string reporting the specific units used by the coordinate system.
CopyC#
// Find out the Units used in a CoordinateSystem.
CoordinateSystem bng = CoordinateSystem.ProjectedCoordinateSystems.NationalGrids.Europe.BritishNationalGrid;
string message = "The coordinate system " + bng.Name +
    " uses the units " + bng.Unit.GetPluralName(UnitNameOptions.Detailed);
CopyVB.NET
' Find out the Units used in a CoordinateSystem.
Dim bng As CoordinateSystem = CoordinateSystem.ProjectedCoordinateSystems.NationalGrids.Europe.BritishNationalGrid
Dim message As String = "The coordinate system " & bng.Name & _
    " uses the units " & bng.Unit.GetPluralName(UnitNameOptions.Detailed)

Inheritance Hierarchy

System..::.Object

  ESRI.ArcGISExplorer.Geometry..::.Unit

See Also