ArcGIS Runtime SDK for iOS: AGSPoint.h Source File
ArcGIS Runtime SDK for iOS  100.9
AGSPoint.h
Go to the documentation of this file.
1 /*
2  COPYRIGHT 1995-2020 ESRI
3 
4  TRADE SECRETS: ESRI PROPRIETARY AND CONFIDENTIAL
5  Unpublished material - all rights reserved under the
6  Copyright Laws of the United States and applicable international
7  laws, treaties, and conventions.
8 
9  For additional information, contact:
10  Environmental Systems Research Institute, Inc.
11  Attn: Contracts and Legal Services Department
12  380 New York Street
13  Redlands, California, 92373
14  USA
15 
16  email: contracts@esri.com
17  */
18 
19 #import <ArcGIS/AGSGeometry.h>
20 #import <ArcGIS/AGSDefines.h>
21 #import <CoreLocation/CLLocation.h>
22 
23 @class AGSSpatialReference;
24 @class AGSPointBuilder;
25 
26 
27 
57 @interface AGSPoint : AGSGeometry
58 
59 #pragma mark -
60 #pragma mark initializers
61 
62 
63 
74 -(instancetype)initWithX:(double)x y:(double)y spatialReference:(nullable AGSSpatialReference*)spatialReference;
75 
89 -(instancetype)initWithX:(double)x y:(double)y z:(double)z spatialReference:(nullable AGSSpatialReference*)spatialReference;
90 
102 -(instancetype)initWithX:(double)x y:(double)y m:(double)m spatialReference:(nullable AGSSpatialReference*)spatialReference;
103 
118 -(instancetype)initWithX:(double)x y:(double)y z:(double)z m:(double)m spatialReference:(nullable AGSSpatialReference*)spatialReference;
119 
128 -(instancetype)initWithCLLocationCoordinate2D:(CLLocationCoordinate2D)locationCoordinate;
129 
140 +(instancetype)pointWithX:(double)x y:(double)y spatialReference:(nullable AGSSpatialReference*)spatialReference;
141 
155 +(instancetype)pointWithX:(double)x y:(double)y z:(double)z spatialReference:(nullable AGSSpatialReference*)spatialReference;
156 
168 +(instancetype)pointWithX:(double)x y:(double)y m:(double)m spatialReference:(nullable AGSSpatialReference*)spatialReference;
169 
184 +(instancetype)pointWithX:(double)x y:(double)y z:(double)z m:(double)m spatialReference:(nullable AGSSpatialReference*)spatialReference;
185 
194 +(instancetype)pointWithCLLocationCoordinate2D:(CLLocationCoordinate2D)locationCoordinate;
195 
196 #pragma mark -
197 #pragma mark properties
198 
204 @property (nonatomic, assign, readonly) double x;
205 
211 @property (nonatomic, assign, readonly) double y;
212 
226 @property (nonatomic, assign, readonly) double m;
227 
254 @property (nonatomic, assign, readonly) double z;
255 
256 #pragma mark -
257 #pragma mark methods
258 
268 
276 -(BOOL)isEqualToGeometry:(AGSPoint*)other;
277 
283 -(CLLocationCoordinate2D)toCLLocationCoordinate2D;
284 
285 @end
286 
287 
288 //
289 // The following are C-style factory methods
290 // Usage:
291 // AGSPoint *p = AGSPointMake(-117.123, 34.123, [AGSSpatialReference spatialReferenceWithWKID:4326]);
292 // AGSPoint *p = AGSPointMake3D(1.123e6, 234e6, 789, 987, [AGSSpatialReference webMercator]);
293 // AGSPoint *p = AGSPointMakeWGS84(34.123, -117.123);
294 // AGSPoint *p = AGSPointMakeWebMercator(1.123e6, 234e6);
295 
296 AGS_EXTERN AGSPoint* AGSPointMake(double x, double y, AGSSpatialReference *__nullable spatialReference);
297 AGS_EXTERN AGSPoint* AGSPointMake3D(double x, double y, double z, double m, AGSSpatialReference *__nullable spatialReference);
298 AGS_EXTERN AGSPoint* AGSPointMakeWGS84(double latitude, double longitude);
300 
301 
302 
AGS_EXTERN AGSPoint * AGSPointMake(double x, double y, AGSSpatialReference *__nullable spatialReference)
AGS_EXTERN AGSPoint * AGSPointMake3D(double x, double y, double z, double m, AGSSpatialReference *__nullable spatialReference)
Defines common members for all specific types of geometry.
Definition: AGSGeometry.h:106
AGS_EXTERN AGSPoint * AGSPointMakeWGS84(double latitude, double longitude)
AGS_EXTERN AGSPoint * AGSPointMakeWebMercator(double x, double y)
double y
Definition: AGSPoint.h:211
Represents the spatial reference of a geometry.
Definition: AGSSpatialReference.h:39
A builder to build point geometries.
Definition: AGSPointBuilder.h:33
double m
Definition: AGSPoint.h:226
double z
Definition: AGSPoint.h:254
CLLocationCoordinate2D toCLLocationCoordinate2D()
#define AGS_EXTERN
Definition: AGSDefines.h:22
AGSPointBuilder * toBuilder()
double x
Definition: AGSPoint.h:204
A location defined by x and y (and optionally z) coordinates.
Definition: AGSPoint.h:57