ArcGIS Runtime SDK for iOS: AGSLinearUnit.h Source File
ArcGIS Runtime SDK for iOS  100.15
AGSLinearUnit.h
Go to the documentation of this file.
1 /*
2  COPYRIGHT 2022 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 
38 typedef NS_ENUM(NSInteger, AGSLinearUnitID) {
49 };
50 
51 @class AGSAreaUnit;
52 
59 @interface AGSLinearUnit : AGSUnit
60 
61 #pragma mark -
62 #pragma mark initializers
63 
64 
65 
70 -(nullable instancetype)initWithUnitID:(AGSLinearUnitID)unitID;
71 
76 +(nullable instancetype)unitWithUnitID:(AGSLinearUnitID)unitID;
77 
83 +(nullable instancetype)unitWithWKID:(NSInteger)WKID;
84 
89 -(nullable instancetype)initWithAreaUnit:(AGSAreaUnit*)areaUnit;
90 
95 +(nullable instancetype)linearUnitWithAreaUnit:(AGSAreaUnit*)areaUnit;
96 
100 +(instancetype)meters;
101 
105 +(instancetype)feet;
106 
110 +(instancetype)miles;
111 
115 +(instancetype)kilometers;
116 
117 #pragma mark -
118 #pragma mark properties
119 
125 @property (nonatomic, assign, readonly) AGSLinearUnitID unitID;
126 
127 #pragma mark -
128 #pragma mark methods
129 
133 -(nullable AGSAreaUnit*)toAreaUnit;
134 
139 -(double)convertToMeters:(double)value;
140 
145 -(double)convertFromMeters:(double)meters;
146 
152 -(double)convert:(double)value toUnit:(AGSLinearUnit*)toUnit;
153 
159 -(double)convert:(double)value fromUnit:(AGSLinearUnit*)fromUnit;
160 
161 @end
162 
163 
AGSLinearUnitID
Definition: AGSLinearUnit.h:38
@ AGSLinearUnitIDKilometers
Definition: AGSLinearUnit.h:42
@ AGSLinearUnitIDFeet
Definition: AGSLinearUnit.h:40
@ AGSLinearUnitIDMiles
Definition: AGSLinearUnit.h:44
@ AGSLinearUnitIDNauticalMiles
Definition: AGSLinearUnit.h:46
@ AGSLinearUnitIDOther
Definition: AGSLinearUnit.h:48
@ AGSLinearUnitIDCentimeters
Definition: AGSLinearUnit.h:39
@ AGSLinearUnitIDYards
Definition: AGSLinearUnit.h:47
@ AGSLinearUnitIDMeters
Definition: AGSLinearUnit.h:43
@ AGSLinearUnitIDMillimeters
Definition: AGSLinearUnit.h:45
@ AGSLinearUnitIDInches
Definition: AGSLinearUnit.h:41
Defines an area unit of measurement.
Definition: AGSAreaUnit.h:61
Defines a linear unit of measurement.
Definition: AGSLinearUnit.h:60
instancetype miles()
AGSLinearUnitID unitID
Definition: AGSLinearUnit.h:125
instancetype feet()
instancetype kilometers()
nullable AGSAreaUnit * toAreaUnit()
instancetype meters()
Defines a unit of measurement.
Definition: AGSUnit.h:68