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

Description

Defines a linear unit of measurement.

AGSLinearUnit is derived from AGSUnit.

Since
100
Inheritance diagram for AGSLinearUnit:
AGSUnit AGSObject

Instance Methods

(double) - convert:fromUnit:
 
(double) - convert:toUnit:
 
(double) - convertFromMeters:
 
(double) - convertToMeters:
 
(nullable instancetype) - initWithAreaUnit:
 
(nullable instancetype) - initWithUnitID:
 
(BOOL) - isEqualToUnit:
 
(nullable AGSAreaUnit *) - toAreaUnit
 

Class Methods

(instancetype) + feet
 
(instancetype) + kilometers
 
(nullable instancetype) + linearUnitWithAreaUnit:
 
(instancetype) + meters
 
(instancetype) + miles
 
(nullable instancetype) + unitWithUnitID:
 
(nullable instancetype) + unitWithWKID:
 

Properties

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

Method Documentation

◆ convert:fromUnit:

- (double) convert: (double)  value
fromUnit: (AGSLinearUnit *)  fromUnit 

Converts the value from the specified linear unit into this unit.

Parameters
valueThe value to convert.
fromUnitThe units the given value is already in.
Since
100

◆ convert:toUnit:

- (double) convert: (double)  value
toUnit: (AGSLinearUnit *)  toUnit 

Converts the value from this unit to the specified linear unit.

Parameters
valueThe value to convert.
toUnitThe units the converted value needs to be in.
Since
100

◆ convertFromMeters:

- (double) convertFromMeters: (double)  meters

Converts the value from meters into this unit.

Parameters
metersThe meters value to convert
Since
100

◆ convertToMeters:

- (double) convertToMeters: (double)  value

Converts the value from this unit to meters.

Parameters
valueThe value to convert.
Since
100

◆ feet

+ (instancetype) feet

A linear unit representing feet.

Since
100

◆ initWithAreaUnit:

- (nullable instancetype) initWithAreaUnit: (AGSAreaUnit *)  areaUnit

Creates a linear unit from an AGSAreaUnit.

Parameters
areaUnitThe area unit used to create a linear unit.
Since
100

◆ initWithUnitID:

- (nullable instancetype) initWithUnitID: (AGSLinearUnitID unitID

Creates a linear unit.

Parameters
unitIDThe linear unit ID.
Since
100

◆ 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

◆ kilometers

+ (instancetype) kilometers

A linear unit representing kilometers.

Since
100

◆ linearUnitWithAreaUnit:

+ (nullable instancetype) linearUnitWithAreaUnit: (AGSAreaUnit *)  areaUnit

Creates a linear unit from an AGSAreaUnit.

Parameters
areaUnitThe area unit used to create a linear unit.
Since
100

◆ meters

+ (instancetype) meters

A linear unit representing meters.

Since
100

◆ miles

+ (instancetype) miles

A linear unit representing miles.

Since
100

◆ toAreaUnit

- (nullable AGSAreaUnit*) toAreaUnit

Returns the corresponding area unit for this linear unit.

Since
100

◆ unitWithUnitID:

+ (nullable instancetype) unitWithUnitID: (AGSLinearUnitID unitID

Creates a linear unit.

Parameters
unitIDThe linear unit ID.
Since
100

◆ unitWithWKID:

+ (nullable instancetype) unitWithWKID: (NSInteger)  WKID

Creates a unit with the given well-known ID (WKID). This allows you to create a unit from a WKID that is not in the associated AGSLinearUnitID enumeration.

Parameters
WKIDThe well-known ID of the unit.
Since
100.7

Property Documentation

◆ abbreviation

- (NSString*) abbreviation
readnonatomiccopyinherited

Abbreviated name of the unit.

Since
100

◆ displayName

- (NSString*) displayName
readnonatomiccopyinherited

A user-friendly name of the measurement unit.

Since
100

◆ name

- (NSString*) name
readnonatomiccopyinherited

The name of the measurement unit.

Since
100

◆ pluralDisplayName

- (NSString*) pluralDisplayName
readnonatomiccopyinherited

A plural form of the user-friendly name.

Since
100

◆ unitID

- (AGSLinearUnitID) unitID
readnonatomicassign

The unit ID of the linear unit.

If an error occurs then the unit ID is AGSLinearUnitIDOther.

Since
100.0

◆ WKID

- (NSInteger) WKID
readnonatomicassigninherited

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

Since
100.14