ArcGIS Runtime SDK for iOS: AGSPoint.h Source File
ArcGIS Runtime SDK for iOS  100.15
AGSPoint.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 
25 #import <Foundation/Foundation.h>
26 #import <ArcGIS/AGSGeometry.h>
27 #import <ArcGIS/AGSDefines.h>
28 #import <CoreLocation/CLLocation.h>
29 
30 @class AGSSpatialReference;
31 @class AGSPointBuilder;
32 
33 
34 
72 @interface AGSPoint : AGSGeometry
73 
74 #pragma mark -
75 #pragma mark initializers
76 
77 
78 
89 -(instancetype)initWithX:(double)x y:(double)y spatialReference:(nullable AGSSpatialReference*)spatialReference;
90 
104 -(instancetype)initWithX:(double)x y:(double)y z:(double)z spatialReference:(nullable AGSSpatialReference*)spatialReference;
105 
117 -(instancetype)initWithX:(double)x y:(double)y m:(double)m spatialReference:(nullable AGSSpatialReference*)spatialReference;
118 
133 -(instancetype)initWithX:(double)x y:(double)y z:(double)z m:(double)m spatialReference:(nullable AGSSpatialReference*)spatialReference;
134 
143 -(instancetype)initWithCLLocationCoordinate2D:(CLLocationCoordinate2D)locationCoordinate;
144 
155 +(instancetype)pointWithX:(double)x y:(double)y spatialReference:(nullable AGSSpatialReference*)spatialReference;
156 
170 +(instancetype)pointWithX:(double)x y:(double)y z:(double)z spatialReference:(nullable AGSSpatialReference*)spatialReference;
171 
183 +(instancetype)pointWithX:(double)x y:(double)y m:(double)m spatialReference:(nullable AGSSpatialReference*)spatialReference;
184 
199 +(instancetype)pointWithX:(double)x y:(double)y z:(double)z m:(double)m spatialReference:(nullable AGSSpatialReference*)spatialReference;
200 
209 +(instancetype)pointWithCLLocationCoordinate2D:(CLLocationCoordinate2D)locationCoordinate;
210 
211 #pragma mark -
212 #pragma mark properties
213 
219 @property (nonatomic, assign, readonly) double x;
220 
226 @property (nonatomic, assign, readonly) double y;
227 
241 @property (nonatomic, assign, readonly) double m;
242 
269 @property (nonatomic, assign, readonly) double z;
270 
271 #pragma mark -
272 #pragma mark methods
273 
283 
291 -(BOOL)isEqualToGeometry:(AGSPoint*)other;
292 
298 -(CLLocationCoordinate2D)toCLLocationCoordinate2D;
299 
300 @end
301 
302 
303 //
304 // The following are C-style factory methods
305 // Usage:
306 // AGSPoint *p = AGSPointMake(-117.123, 34.123, [AGSSpatialReference spatialReferenceWithWKID:4326]);
307 // AGSPoint *p = AGSPointMake3D(1.123e6, 234e6, 789, 987, [AGSSpatialReference webMercator]);
308 // AGSPoint *p = AGSPointMakeWGS84(34.123, -117.123);
309 // AGSPoint *p = AGSPointMakeWebMercator(1.123e6, 234e6);
310 
312 AGS_EXTERN AGSPoint* AGSPointMake3D(double x, double y, double z, double m, AGSSpatialReference *__nullable spatialReference);
313 AGS_EXTERN AGSPoint* AGSPointMakeWGS84(double latitude, double longitude);
315 
316 
317 
#define AGS_EXTERN
Definition: AGSDefines.h:28
AGS_EXTERN AGSPoint * AGSPointMakeWGS84(double latitude, double longitude)
AGS_EXTERN AGSPoint * AGSPointMake3D(double x, double y, double z, double m, AGSSpatialReference *__nullable spatialReference)
AGS_EXTERN AGSPoint * AGSPointMakeWebMercator(double x, double y)
AGS_EXTERN AGSPoint * AGSPointMake(double x, double y, AGSSpatialReference *__nullable spatialReference)
Base class for all classes that represent geometric shapes.
Definition: AGSGeometry.h:121
AGSSpatialReference * spatialReference
Definition: AGSGeometry.h:170
A builder to build point geometries.
Definition: AGSPointBuilder.h:41
A location defined by x and y (and optionally z) coordinates.
Definition: AGSPoint.h:73
AGSPointBuilder * toBuilder()
double y
Definition: AGSPoint.h:226
double m
Definition: AGSPoint.h:241
CLLocationCoordinate2D toCLLocationCoordinate2D()
double x
Definition: AGSPoint.h:219
double z
Definition: AGSPoint.h:269
Represents the spatial reference of a geometry.
Definition: AGSSpatialReference.h:49