ArcGIS Runtime SDK for iOS: AGSUnit Class Reference
ArcGIS Runtime SDK for iOS  100.15
AGSUnit Class Reference

Description

Defines a unit of measurement.

The unit is a common base class for different types of measurement (linear, angular, and area) used throughout ArcGIS Runtime. 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 e.g. for translation from ID to text description.

AGSLinearUnit - 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 AGSGeometryEngine.

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

AGSAreaUnit - 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 AGSUnit 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 AGSLinearUnit (e.g. METERS) is known, then the corresponding AGSAreaUnit (e.g. SQUARE_METERS) can be created based on the AGSLinearUnit.

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 AGSUnit are immutable.

See also
AGSSpatialReference
Since
100
Inheritance diagram for AGSUnit:
AGSObject AGSAngularUnit AGSAreaUnit AGSLinearUnit

Instance Methods

(BOOL) - isEqualToUnit:
 

Properties

NSString * abbreviation
 
NSString * displayName
 
NSString * name
 
NSString * pluralDisplayName
 
NSInteger WKID
 

Method Documentation

◆ isEqualToUnit:

- (BOOL) isEqualToUnit: (AGSUnit *)  unit

Compares whether two units are equal.

Parameters
unitto compare this one to
Returns
YES if the units are equal
Since
100

Property Documentation

◆ abbreviation

- (NSString*) abbreviation
readnonatomiccopy

Abbreviated name of the unit.

Since
100

◆ displayName

- (NSString*) displayName
readnonatomiccopy

A user-friendly name of the measurement unit.

Since
100

◆ name

- (NSString*) name
readnonatomiccopy

The name of the measurement unit.

Since
100

◆ pluralDisplayName

- (NSString*) pluralDisplayName
readnonatomiccopy

A plural form of the user-friendly name.

Since
100

◆ WKID

- (NSInteger) WKID
readnonatomicassign

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

Since
100.14