Provides type initializers for specific units of angular measurement that are 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 static class Angular
Visual Basic (Declaration)
Public NotInheritable Class Angular

Remarks

The properties on this class return Unit objects which represent all of the standard units of angular measurement used in ArcGIS Explorer.

Those units defined as 'international' refer to units of measurement defined by the International System of Units (SI). Many other units in this enumeration refer to older definitions of measurement, and may be used by older coordinate systems and are included to allow older coordinate systems to be defined for the display and conversion of historical data. For example, both Sears and Clarke definitions of units are definitions of imperial units used in some older coordinate systems.

Each type of Unit is identified by a unique number which can be used to initialize and identify the unit in question - for each Unit property, this number is documented.

You may see this number referred to in some ArcGIS documentation as a factory code, projection engine code, or a Well Known Identifier (WKID). For example, ArcGIS Server web service APIs define WKID parameters which allow you to specify a particular unit; developing for ArcGIS using ArcObjects, these numbers are defined in enumeration sets that begin with 'esriSR', for example the enumerations esriSRUnitType and esriSRUnit2Type define identifiers for types of unit of measurement.

These identifier numbers are based on an industry standard defined by the European Petroleum Survey Group (EPSG), and very occasionally, the code value for which an enumeration stands may change; for this reason it is recommended that you use the enumeration member rather than the numeric value in code. Any changes will be noted in the change reports for this API. You can find out more information about the units and coordinate systems defined by the EPSG at their website, http://www.epsg.org.

Examples

The code below uses .NET reflection to find all of the nested type initializers that create new Unit objects, and then creates an instance of each type of Unit. It then reports on the units by writing to the Debug window using Name property (and Id property where applicable), listing linear, angular and area units separately.
CopyC#
// Get all the different types of Linear units.
System.Reflection.PropertyInfo[] linearProps = typeof(Unit.Linear).GetProperties(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static);

// Report linear units.
System.Diagnostics.Debug.WriteLine("Linear Units are:");
foreach (System.Reflection.PropertyInfo prop in linearProps)
{
    Unit u = prop.GetValue(null, null) as Unit;
    System.Diagnostics.Debug.WriteLine(u.Name + "(" + u.Id.ToString() + ")");
}

// Get all the different types of angular units.
System.Reflection.PropertyInfo[] angularProps = typeof(Unit.Angular).GetProperties(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static);

// Report angular units.
System.Diagnostics.Debug.WriteLine("Angular Units are:");
foreach (System.Reflection.PropertyInfo prop in angularProps)
{
    Unit u = prop.GetValue(null, null) as Unit;
    System.Diagnostics.Debug.WriteLine(u.Name + "(" + u.Id.ToString() + ")");
}

// Get all the different types of area units.
System.Reflection.PropertyInfo[] areaProps = typeof(Unit.Area).GetProperties(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static);

// Report area units.
System.Diagnostics.Debug.WriteLine("Area Units are:");
foreach (System.Reflection.PropertyInfo prop in areaProps)
{
    Unit u = prop.GetValue(null, null) as Unit;
    System.Diagnostics.Debug.WriteLine(u.Name); // Area units do not have identifiers.
}
CopyVB.NET
' Get all the different types of Linear units.
Dim linearProps As System.Reflection.PropertyInfo() = GetType(Unit.Linear).GetProperties(System.Reflection.BindingFlags.Public Or System.Reflection.BindingFlags.Static)

' Report linear units.
System.Diagnostics.Debug.WriteLine("Linear Units are:")
Dim prop As System.Reflection.PropertyInfo
For Each prop In linearProps
    Dim u As Unit = CType(prop.GetValue(Nothing, Nothing), Unit)
    System.Diagnostics.Debug.WriteLine(u.Name & "(" & u.Id.ToString() & ")")
Next

' Get all the different types of angular units.
Dim angularProps As System.Reflection.PropertyInfo() = GetType(Unit.Angular).GetProperties(System.Reflection.BindingFlags.Public Or System.Reflection.BindingFlags.Static)

' Report angular units.
System.Diagnostics.Debug.WriteLine("Angular Units are:")
For Each prop In angularProps
    Dim u As Unit = CType(prop.GetValue(Nothing, Nothing), Unit)
    System.Diagnostics.Debug.WriteLine(u.Name & "(" & u.Id.ToString() & ")")
Next

' Get all the different types of area units.
Dim areaProps As System.Reflection.PropertyInfo() = GetType(Unit.Area).GetProperties(System.Reflection.BindingFlags.Public Or System.Reflection.BindingFlags.Static)

' Report angular units.
System.Diagnostics.Debug.WriteLine("Area Units are:")
For Each prop In areaProps
    Dim u As Unit = CType(prop.GetValue(Nothing, Nothing), Unit)
    System.Diagnostics.Debug.WriteLine(u.Name)    ' Area units do not have Identifiers
Next

Inheritance Hierarchy

System..::.Object

  ESRI.ArcGISExplorer.Geometry..::.Unit..::.Angular

See Also