ArcGIS Runtime SDK for iOS: AGSAreaUnit.h Source File
ArcGIS Runtime SDK for iOS  100.15
AGSAreaUnit.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, AGSAreaUnitID) {
39  AGSAreaUnitIDAcres = 109402,
50 };
51 
52 @class AGSLinearUnit;
53 
60 @interface AGSAreaUnit : AGSUnit
61 
62 #pragma mark -
63 #pragma mark initializers
64 
65 
66 
71 -(nullable instancetype)initWithUnitID:(AGSAreaUnitID)unitID;
72 
77 -(nullable instancetype)initWithLinearUnit:(AGSLinearUnit*)linearUnit;
78 
83 +(nullable instancetype)unitWithUnitID:(AGSAreaUnitID)unitID;
84 
90 +(nullable instancetype)unitWithWKID:(NSInteger)WKID;
91 
96 +(nullable instancetype)areaUnitWithLinearUnit:(AGSLinearUnit*)linearUnit;
97 
101 +(instancetype)squareFeet;
102 
106 +(instancetype)squareMeters;
107 
111 +(instancetype)squareMiles;
112 
116 +(instancetype)squareKilometers;
117 
118 #pragma mark -
119 #pragma mark properties
120 
121 @property (nonatomic, assign, readonly) AGSAreaUnitID unitID;
122 
123 #pragma mark -
124 #pragma mark methods
125 
129 -(nullable AGSLinearUnit*)toLinearUnit;
130 
135 -(double)convertToSquareMeters:(double)area;
136 
141 -(double)convertFromSquareMeters:(double)area;
142 
148 -(double)convert:(double)area toUnit:(AGSAreaUnit*)toUnit;
149 
155 -(double)convert:(double)area fromUnit:(AGSAreaUnit*)fromUnit;
156 
157 @end
158 
159 
AGSAreaUnitID
Definition: AGSAreaUnit.h:38
@ AGSAreaUnitIDSquareMiles
Definition: AGSAreaUnit.h:47
@ AGSAreaUnitIDSquareDecimeters
Definition: AGSAreaUnit.h:42
@ AGSAreaUnitIDSquareYards
Definition: AGSAreaUnit.h:48
@ AGSAreaUnitIDSquareMillimeters
Definition: AGSAreaUnit.h:46
@ AGSAreaUnitIDSquareMeters
Definition: AGSAreaUnit.h:45
@ AGSAreaUnitIDOther
Definition: AGSAreaUnit.h:49
@ AGSAreaUnitIDHectares
Definition: AGSAreaUnit.h:40
@ AGSAreaUnitIDSquareFeet
Definition: AGSAreaUnit.h:43
@ AGSAreaUnitIDSquareCentimeters
Definition: AGSAreaUnit.h:41
@ AGSAreaUnitIDSquareKilometers
Definition: AGSAreaUnit.h:44
@ AGSAreaUnitIDAcres
Definition: AGSAreaUnit.h:39
Defines an area unit of measurement.
Definition: AGSAreaUnit.h:61
instancetype squareMeters()
nullable AGSLinearUnit * toLinearUnit()
instancetype squareMiles()
instancetype squareFeet()
instancetype squareKilometers()
AGSAreaUnitID unitID
Definition: AGSAreaUnit.h:121
Defines a linear unit of measurement.
Definition: AGSLinearUnit.h:60
Defines a unit of measurement.
Definition: AGSUnit.h:68