MeasurementUnit

sealed class MeasurementUnit

Defines a unit of measurement. MeasurementUnit is a base class for measurement classes such as LinearUnit, AngularUnit, and AreaUnit. Many function parameters only accept specific types of measurement to reduce the chance of accidental use of inappropriate values, but some generic functions accept all unit types, such as for translation from ID to text description.

LinearUnit - Projected coordinate systems define coordinates using linear measurements, for example using meters or miles. They are also used to return distance measurements, for example by some members of GeometryEngine.

AngularUnit - Geographic coordinate systems define coordinates using angular measurements, for example using degrees or radians.

AreaUnit - Projected coordinate systems define area units for two dimensional measurements such as the area enclosed by a ring, for example in acres or square kilometers.

Linear, angular, and area units can be defined by using enumerations of the most common units of measurement. They can also be defined by well-known ID (WKID) or well-known text (WKText). Create the unit instances using the Unit base class or the subtype, passing in the enumeration for a specific unit of measurement.

Construction of related units are also supported so that if, for instance, the LinearUnit (e.g. METERS) is known, then the corresponding AreaUnit (e.g. SQUARE_METERS) can be created based on the LinearUnit.

Custom unit implementations are not supported.

Each instance of the various units types has properties for the unit name (singular, plural, and abbreviated) and provides methods for unit conversion between different units of measurement in the same category of measurement.

All unit names and abbreviations are returned in the English language. Instances of unit are immutable.

Since

200.1.0

See also

Inheritors

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The abbreviation of the unit. The abbreviation for a specific unit.

Link copied to clipboard

The display name of the unit. The display name for a specific unit.

Link copied to clipboard

The name of the unit. The name for a specific unit.

Link copied to clipboard

The display name of the unit. The display name for a specific unit.

Link copied to clipboard
val wkid: Int

The well-known ID for the unit, or 0 for a custom unit.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int