ArcGIS Runtime SDK for iOS: AGSPoint Class Reference
ArcGIS Runtime SDK for iOS  100.6
AGSPoint Class Reference

Description

Instances of this class represent a point geometry. A point is a pair of x,y coordinates, and optionally a z-coordinate and/or m-value (measure).

A point is associated with a spatial reference which specifies the coordinate system that its coordinate values use.

Since
100
Note
This class represents an immutable point geometry, it cannot be modified after being created. Use toBuilder (AGSPoint): to get a point builder.
See also
AGSPointBuilder to construct or modify points programmatically.
AGSSketchEditor to construct or modify geometries interactively by sketching on a map.
AGSGeometryEngine to perform operations on geometries.
Inheritance diagram for AGSPoint:
AGSGeometry AGSObject <AGSJSONSerializable>

Instance Methods

(instancetype) - initWithCLLocationCoordinate2D:
 
(instancetype) - initWithX:y:m:spatialReference:
 
(instancetype) - initWithX:y:spatialReference:
 
(instancetype) - initWithX:y:z:m:spatialReference:
 
(instancetype) - initWithX:y:z:spatialReference:
 
(BOOL) - isEqualToGeometry:
 
(BOOL) - isEqualToGeometry:
 
(BOOL) - isEqualToGeometry:tolerance:
 
(AGSPointBuilder *) - toBuilder
 
(CLLocationCoordinate2D) - toCLLocationCoordinate2D
 
(nullable id) - toJSON:
 

Class Methods

(nullable id< AGSJSONSerializable >) + fromJSON:error:
 
(instancetype) + pointWithCLLocationCoordinate2D:
 
(instancetype) + pointWithX:y:m:spatialReference:
 
(instancetype) + pointWithX:y:spatialReference:
 
(instancetype) + pointWithX:y:z:m:spatialReference:
 
(instancetype) + pointWithX:y:z:spatialReference:
 

Properties

AGSGeometryDimension dimension
 
BOOL empty
 
AGSEnvelopeextent
 
AGSGeometryType geometryType
 
BOOL hasCurves
 
BOOL hasM
 
BOOL hasZ
 
double m
 
AGSSpatialReferencespatialReference
 
NSDictionary< NSString *, id > * unknownJSON
 
NSDictionary< NSString *, id > * unsupportedJSON
 
double x
 
double y
 
double z
 

Method Documentation

§ fromJSON:error:()

+ (nullable id<AGSJSONSerializable>) fromJSON: (id)  JSONObject
error: (NSError **)  error 
staticrequiredinherited

Initializes and returns an object from its JSON representation.

Parameters
JSONObjectNSDictionary or NSArray containing the JSON.
errorencountered during the operation, if any.
Since
100

§ initWithCLLocationCoordinate2D:()

- (instancetype) initWithCLLocationCoordinate2D: (CLLocationCoordinate2D)  locationCoordinate

Initializes a point geometry with the provided location information.

Parameters
locationCoordinateof the device
Returns
An initialized point geometry
Note
The point geometry is immutable, it cannot be modified after being created. Use toBuilder: to get a builder to further modify the geometry.
Since
100

§ initWithX:y:m:spatialReference:()

- (instancetype) initWithX: (double)  x
y: (double)  y
m: (double)  m
spatialReference: (nullable AGSSpatialReference *)  spatialReference 

Initializes a point geometry with the provided coordinate values.

Parameters
xThe position along x-axis
yThe position along y-axis
mThe measure value
spatialReferenceThe coordinate system that the coordinate values use.
Returns
An initialized point geometry
Note
The point geometry is immutable, it cannot be modified after being created. Use toBuilder: to get a builder to further modify the geometry.
Since
100

§ initWithX:y:spatialReference:()

- (instancetype) initWithX: (double)  x
y: (double)  y
spatialReference: (nullable AGSSpatialReference *)  spatialReference 

Initializes a point geometry with the provided coordinate values.

Parameters
xThe position along x-axis
yThe position along y-axis
spatialReferenceThe coordinate system that the coordinate values use.
Returns
An initialized point geometry
Note
The point geometry is immutable, it cannot be modified after being created. Use toBuilder: to get a builder to further modify the geometry.
Since
100

§ initWithX:y:z:m:spatialReference:()

- (instancetype) initWithX: (double)  x
y: (double)  y
z: (double)  z
m: (double)  m
spatialReference: (nullable AGSSpatialReference *)  spatialReference 

Initializes a point geometry with the provided coordinate values.

Parameters
xThe position along x-axis
yThe position along y-axis
zThe position along z-axis
mThe measure value
spatialReferenceThe coordinate system that the coordinate values use.
Returns
An initialized point geometry
Note
The point geometry is immutable, it cannot be modified after being created. Use toBuilder: to get a builder to further modify the geometry.
Since
100

§ initWithX:y:z:spatialReference:()

- (instancetype) initWithX: (double)  x
y: (double)  y
z: (double)  z
spatialReference: (nullable AGSSpatialReference *)  spatialReference 

Initializes a point geometry with the provided coordinate values.

Parameters
xThe position along x-axis
yThe position along y-axis
zThe position along z-axis
spatialReferenceThe coordinate system that the coordinate values use.
Returns
An initialized point geometry
Note
The point geometry is immutable, it cannot be modified after being created. Use toBuilder: to get a builder to further modify the geometry.
Since
100

§ isEqualToGeometry:() [1/2]

- (BOOL) isEqualToGeometry: (AGSGeometry *)  other

Compares whether two geometries are equal.

Parameters
othergeometry to compare this geometry to
Returns
YES if the geometries are equal
Since
100

§ isEqualToGeometry:() [2/2]

- (BOOL) isEqualToGeometry: (AGSPoint *)  other

Compares whether two point geometries are equal.

Parameters
otherpoint to compare this point to
Returns
YES if the points are equal
Since
100

§ isEqualToGeometry:tolerance:()

- (BOOL) isEqualToGeometry: (AGSGeometry *)  other
tolerance: (double)  tolerance 

§ pointWithCLLocationCoordinate2D:()

+ (instancetype) pointWithCLLocationCoordinate2D: (CLLocationCoordinate2D)  locationCoordinate

Initializes a point geometry with the provided location information.

Parameters
locationCoordinateof the device
Returns
An initialized point geometry
Note
The point geometry is immutable, it cannot be modified after being created. Use toBuilder: to get a builder to further modify the geometry.
Since
100

§ pointWithX:y:m:spatialReference:()

+ (instancetype) pointWithX: (double)  x
y: (double)  y
m: (double)  m
spatialReference: (nullable AGSSpatialReference *)  spatialReference 

Initializes a point geometry with the provided coordinate values.

Parameters
xThe position along x-axis
yThe position along y-axis
mThe measure value
spatialReferenceThe coordinate system that the coordinate values use.
Returns
An initialized point geometry
Note
The point geometry is immutable, it cannot be modified after being created. Use toBuilder: to get a builder to further modify the geometry.
Since
100

§ pointWithX:y:spatialReference:()

+ (instancetype) pointWithX: (double)  x
y: (double)  y
spatialReference: (nullable AGSSpatialReference *)  spatialReference 

Initializes a point geometry with the provided coordinate values.

Parameters
xThe position along x-axis
yThe position along y-axis
spatialReferenceThe coordinate system that the coordinate values use.
Returns
An initialized point geometry
Note
The point geometry is immutable, it cannot be modified after being created. Use toBuilder: to get a builder to further modify the geometry.
Since
100

§ pointWithX:y:z:m:spatialReference:()

+ (instancetype) pointWithX: (double)  x
y: (double)  y
z: (double)  z
m: (double)  m
spatialReference: (nullable AGSSpatialReference *)  spatialReference 

Initializes a point geometry with the provided coordinate values.

Parameters
xThe position along x-axis
yThe position along y-axis
zThe position along z-axis
mThe measure value
spatialReferenceThe coordinate system that the coordinate values use.
Returns
An initialized point geometry
Note
The point geometry is immutable, it cannot be modified after being created. Use toBuilder: to get a builder to further modify the geometry.
Since
100

§ pointWithX:y:z:spatialReference:()

+ (instancetype) pointWithX: (double)  x
y: (double)  y
z: (double)  z
spatialReference: (nullable AGSSpatialReference *)  spatialReference 

Initializes a point geometry with the provided coordinate values.

Parameters
xThe position along x-axis
yThe position along y-axis
zThe position along z-axis
spatialReferenceThe coordinate system that the coordinate values use.
Returns
An initialized point geometry
Note
The point geometry is immutable, it cannot be modified after being created. Use toBuilder: to get a builder to further modify the geometry.
Since
100

§ toBuilder()

- (AGSPointBuilder*) toBuilder

Returns a builder using a copy of this geometry as a starting off point. The builder can be used to make modifications to the geometry.

Returns
builder that can be used to modify or create point geometries.
Since
100
Note
Operations on the builder affect only its own internal copy of the geometry. They do not affect this geometry.

Implements AGSGeometry.

§ toCLLocationCoordinate2D()

- (CLLocationCoordinate2D) toCLLocationCoordinate2D

Converts current point into CLLocationCoordinate2D.

Since
100

§ toJSON:()

- (nullable id) toJSON: (NSError **)  error
requiredinherited

Returns JSON representation for this object.

Parameters
errorencountered during the operation, if any.
Returns
NSDictionary or NSArray containing the JSON.
Since
100

Reimplemented in AGSPortalItem.

Property Documentation

§ dimension

- (AGSGeometryDimension) dimension
readnonatomicassigninherited

§ empty

- (BOOL) empty
readnonatomicassigninherited

Indicates whether this geometry has any vertices.

Since
100

§ extent

- (AGSEnvelope*) extent
readnonatomicstronginherited

Smallest, rectangular bounding-box that covers the geometry.

Since
100

§ geometryType

- (AGSGeometryType) geometryType
readnonatomicassigninherited

The type of this geometry.

Since
100

§ hasCurves

- (BOOL) hasCurves
readnonatomicassigninherited

Indicates whether this geometry has curves.

Since
100

§ hasM

- (BOOL) hasM
readnonatomicassigninherited

Indicates whether this geometry contains m (measure) values.

Since
100

§ hasZ

- (BOOL) hasZ
readnonatomicassigninherited

Indicates whether this geometry contains z coordinate values. Only 3D geometries contain z values.

Since
100

§ m

- (double) m
readnonatomicassign

The measure value.

Since
100
See also
AGSGeometry::hasM to check if the geometry has measure values.

§ spatialReference

- (AGSSpatialReference*) spatialReference
readnonatomicstronginherited

The spatial reference associated with the gometry. It specifies the coordinate system for the geometry's x, y, and z coordinate values.

Since
100
Note
Geometries that represent geographic locations should always have a spatial reference. Otherwise the coordinates of the geometry are meaningless.

§ unknownJSON

- (NSDictionary<NSString*,id>*) unknownJSON
readrequirednonatomiccopyinherited

A dictionary of values that was in the source JSON but was unparsed by API.

Returns
NSDictionary containing the unknown JSON.
Since
100

§ unsupportedJSON

- (NSDictionary<NSString*,id>*) unsupportedJSON
readnonatomiccopyinherited

A dictionary of values that are supported by the REST API, but not exposed through the SDK API.

Returns
NSDictionary containing the unsupported JSON.
Since
100

§ x

- (double) x
readnonatomicassign

The position along x-axis.

Since
100

§ y

- (double) y
readnonatomicassign

The position along y-axis.

Since
100

§ z

- (double) z
readnonatomicassign

The position along z-axis. Only applicable for 3D point geometries.

Since
100
See also
AGSGeometry::hasZ to check if the geometry has z values.