Namespace:
ESRI.ArcGISExplorer.Geometry
Assembly:
ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.900 (2.0.0.900)
Syntax
C# |
---|
public enum UnitType |
Visual Basic (Declaration) |
---|
Public Enumeration UnitType |
Members
Value | Member name | Description | |
---|---|---|---|
1 | Angular |
Specifies angular units of measurement, for example those used in polar coordinates such as Degrees or Radians.
Angular units are used by geographic coordinate systems.
| |
0 | Linear |
Specifies linear units of measurement, for example those measuring distance such as Meters or Miles.
Linear units are used by projected coordinate systems, and in measurement and conversion functions.
| |
2 | Area |
Specifies areal units of measurement, for example those measuring areas such as Hectares and Square Meters.
Area units are used in measurement and conversion functions.
|
Remarks
The coordinates of a Geometry are defined by its coordinate system. Geographic coordinate systems use angular units, defining coordinates in terms of latitude and longitude, which are angles calculated from the center of the earth describing a position on its surface. Coordinates described in this way are sometimes referred to as polar coordinates. Projected coordinate systems use linear units, defining positions on the earths surface as coordinates on earths surface as projected to a flat plane. For this reason, the coordinates of a Geometry may be specified in linear or angular units, depending on the coordinate system used by the Geometry.
Examples

// NOTE: existingPoint should be an existing Point with a CoordinateSystem set. UnitType pointUnitType = existingPoint.CoordinateSystem.Unit.UnitType; System.Text.StringBuilder sb = new System.Text.StringBuilder("Coordinates of the point are:"); sb.AppendLine(); // If the Point has angular units if (pointUnitType == UnitType.Angular) { sb.AppendLine("Latitude = " + existingPoint.Y.ToString()); sb.AppendLine("Longitude = "+ existingPoint.X.ToString()); } else if (pointUnitType == UnitType.Linear) { sb.AppendLine("X = " + existingPoint.X.ToString()); sb.AppendLine("Y = " + existingPoint.Y.ToString()); }

' NOTE: existingPoint should be an existing Point with a CoordinateSystem set. Dim pointUnitType As UnitType = existingPoint.CoordinateSystem.Unit.UnitType Dim sb As New System.Text.StringBuilder("Coordinates of the point are:") sb.AppendLine() ' If the Point has angular units If pointUnitType = UnitType.Angular Then sb.AppendLine("Latitude = " & existingPoint.Y) sb.AppendLine("Longitude = " & existingPoint.X) ElseIf pointUnitType = UnitType.Linear Then sb.AppendLine("X = " & existingPoint.X.ToString()) sb.AppendLine("Y = " & existingPoint.Y.ToString()) End If
See Also
CoordinateSystem Class
CoordinateSystem.GeographicCoordinateSystems Class
CoordinateSystem.ProjectedCoordinateSystems Class
CoordinateSystemType Enumeration
Envelope Class
GeodesicUtilities Class
GeographicTransformation Class
GeographicTransformationCollection Class
Geometry Class
GeometryOperations Class
GeometryType Enumeration
Multipatch Class
Multipoint Class
Point Class
Polygon Class
Polyline Class
SoapConverter Class
Unit Class
Unit.Angular Class
Unit.Area Class
Unit.Linear Class
UnitNameOptions Enumeration