ArcGIS Runtime SDK for iOS: AGSLinearUnit.h Source File
ArcGIS Runtime SDK for iOS  100.11
AGSLinearUnit.h
Go to the documentation of this file.
1 /*
2  COPYRIGHT 2021 ESRI
3 
4  All rights reserved under the copyright laws of the United States
5  and applicable international laws, treaties, and conventions.
6 
7  This material is licensed for use under the Esri Master License
8  Agreement (MLA), and is bound by the terms of that agreement.
9  You may redistribute and use this code without modification,
10  provided you adhere to the terms of the MLA and include this
11  copyright notice.
12 
13  See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english
14 
15  For additional information, contact:
16  Environmental Systems Research Institute, Inc.
17  Attn: Contracts and Legal Services Department
18  380 New York Street
19  Redlands, California, 92373
20  USA
21 
22  email: contracts@esri.com
23  */
24  //Required for Globals API doc
26 
27 #import <Foundation/Foundation.h>
28 #import <ArcGIS/AGSUnit.h>
29 
30 
31 
36 typedef NS_ENUM(NSInteger, AGSLinearUnitID) {
47 };
48 
49 @class AGSAreaUnit;
50 
57 @interface AGSLinearUnit : AGSUnit
58 
59 #pragma mark -
60 #pragma mark initializers
61 
62 
63 
70 -(nullable instancetype)initWithUnitID:(AGSLinearUnitID)unitID;
71 
78 +(nullable instancetype)unitWithUnitID:(AGSLinearUnitID)unitID;
79 
85 +(nullable instancetype)unitWithWKID:(NSInteger)WKID;
86 
92 -(nullable instancetype)initWithAreaUnit:(AGSAreaUnit*)areaUnit;
93 
99 +(nullable instancetype)linearUnitWithAreaUnit:(AGSAreaUnit*)areaUnit;
100 
106 +(instancetype)meters;
107 
113 +(instancetype)feet;
114 
120 +(instancetype)miles;
121 
127 +(instancetype)kilometers;
128 
129 #pragma mark -
130 #pragma mark properties
131 
132 @property (nonatomic, assign, readonly) AGSLinearUnitID unitID;
133 
134 #pragma mark -
135 #pragma mark methods
136 
142 -(nullable AGSAreaUnit*)toAreaUnit;
143 
150 -(double)convertToMeters:(double)value;
151 
158 -(double)convertFromMeters:(double)meters;
159 
167 -(double)convert:(double)value toUnit:(AGSLinearUnit*)toUnit;
168 
176 -(double)convert:(double)value fromUnit:(AGSLinearUnit*)fromUnit;
177 
178 @end
179 
180 
AGSLinearUnitID
Definition: AGSLinearUnit.h:36
@ AGSLinearUnitIDKilometers
Definition: AGSLinearUnit.h:40
@ AGSLinearUnitIDFeet
Definition: AGSLinearUnit.h:38
@ AGSLinearUnitIDMiles
Definition: AGSLinearUnit.h:42
@ AGSLinearUnitIDNauticalMiles
Definition: AGSLinearUnit.h:44
@ AGSLinearUnitIDOther
Definition: AGSLinearUnit.h:46
@ AGSLinearUnitIDCentimeters
Definition: AGSLinearUnit.h:37
@ AGSLinearUnitIDYards
Definition: AGSLinearUnit.h:45
@ AGSLinearUnitIDMeters
Definition: AGSLinearUnit.h:41
@ AGSLinearUnitIDMillimeters
Definition: AGSLinearUnit.h:43
@ AGSLinearUnitIDInches
Definition: AGSLinearUnit.h:39
Defines an area unit of measurement.
Definition: AGSAreaUnit.h:64
Defines a linear unit of measurement.
Definition: AGSLinearUnit.h:58
instancetype miles()
AGSLinearUnitID unitID
Definition: AGSLinearUnit.h:132
instancetype feet()
instancetype kilometers()
nullable AGSAreaUnit * toAreaUnit()
instancetype meters()
Defines a unit of measurement.
Definition: AGSUnit.h:68