Assembly: ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 22.214.171.1240 (126.96.36.1990)
public sealed class Unit
|Visual Basic (Declaration)|
Public NotInheritable Class Unit
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 and . 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:
// 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);
' 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)