ArcGIS Runtime SDK for iOS
100.15
|
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.
AGSSpatialReference
Instance Methods | |
(BOOL) | - isEqualToUnit: |
Properties | |
NSString * | abbreviation |
NSString * | displayName |
NSString * | name |
NSString * | pluralDisplayName |
NSInteger | WKID |
- (BOOL) isEqualToUnit: | (AGSUnit *) | unit |
Compares whether two units are equal.
unit | to compare this one to |
|
readnonatomiccopy |
Abbreviated name of the unit.
|
readnonatomiccopy |
A user-friendly name of the measurement unit.
|
readnonatomiccopy |
The name of the measurement unit.
|
readnonatomiccopy |
A plural form of the user-friendly name.
|
readnonatomicassign |
The well-known ID for the unit, or 0
for a custom unit.