ArcGIS Runtime SDK for iOS: AGSAreaUnit.h Source File
ArcGIS Runtime SDK for iOS  100.11
AGSAreaUnit.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 
41 typedef NS_ENUM(NSInteger, AGSAreaUnitID) {
42  AGSAreaUnitIDAcres = 109402,
53 };
54 
55 @class AGSLinearUnit;
56 
63 @interface AGSAreaUnit : AGSUnit
64 
65 #pragma mark -
66 #pragma mark initializers
67 
68 
69 
76 -(nullable instancetype)initWithUnitID:(AGSAreaUnitID)unitID;
77 
84 -(nullable instancetype)initWithLinearUnit:(AGSLinearUnit*)linearUnit;
85 
92 +(nullable instancetype)unitWithUnitID:(AGSAreaUnitID)unitID;
93 
99 +(nullable instancetype)unitWithWKID:(NSInteger)WKID;
100 
107 +(nullable instancetype)areaUnitWithLinearUnit:(AGSLinearUnit*)linearUnit;
108 
114 +(instancetype)squareFeet;
115 
121 +(instancetype)squareMeters;
122 
128 +(instancetype)squareMiles;
129 
135 +(instancetype)squareKilometers;
136 
137 #pragma mark -
138 #pragma mark properties
139 
140 @property (nonatomic, assign, readonly) AGSAreaUnitID unitID;
141 
142 #pragma mark -
143 #pragma mark methods
144 
150 -(nullable AGSLinearUnit*)toLinearUnit;
151 
158 -(double)convertToSquareMeters:(double)area;
159 
166 -(double)convertFromSquareMeters:(double)area;
167 
175 -(double)convert:(double)area toUnit:(AGSAreaUnit*)toUnit;
176 
184 -(double)convert:(double)area fromUnit:(AGSAreaUnit*)fromUnit;
185 
186 @end
187 
188 
AGSAreaUnitID
Definition: AGSAreaUnit.h:41
@ AGSAreaUnitIDSquareMiles
Definition: AGSAreaUnit.h:50
@ AGSAreaUnitIDSquareDecimeters
Definition: AGSAreaUnit.h:45
@ AGSAreaUnitIDSquareYards
Definition: AGSAreaUnit.h:51
@ AGSAreaUnitIDSquareMillimeters
Definition: AGSAreaUnit.h:49
@ AGSAreaUnitIDSquareMeters
Definition: AGSAreaUnit.h:48
@ AGSAreaUnitIDOther
Definition: AGSAreaUnit.h:52
@ AGSAreaUnitIDHectares
Definition: AGSAreaUnit.h:43
@ AGSAreaUnitIDSquareFeet
Definition: AGSAreaUnit.h:46
@ AGSAreaUnitIDSquareCentimeters
Definition: AGSAreaUnit.h:44
@ AGSAreaUnitIDSquareKilometers
Definition: AGSAreaUnit.h:47
@ AGSAreaUnitIDAcres
Definition: AGSAreaUnit.h:42
Defines an area unit of measurement.
Definition: AGSAreaUnit.h:64
instancetype squareMeters()
nullable AGSLinearUnit * toLinearUnit()
instancetype squareMiles()
instancetype squareFeet()
instancetype squareKilometers()
AGSAreaUnitID unitID
Definition: AGSAreaUnit.h:140
Defines a linear unit of measurement.
Definition: AGSLinearUnit.h:58
Defines a unit of measurement.
Definition: AGSUnit.h:68