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

Description

A base class for all geometry types. Geometries define a spatial location and an associated geometric shape. Types of geometries include points, polylines, polygons, envelopes, and so on. Geometries may be two-dimensional (x,y coordinates) or three-dimensional (x,y,z coordinates). They may also include an m (measure) value for each vertex.

Every non-empty geometry has an inherent dimension (sometimes called the topological dimensionality) that indicates the general class of the geometry.

  • 0 for points and multipoints.
  • 1 for lines and polylines.
  • 2 for polygons and envelopes.
  • 3 for objects with volume.

Geometries are associated with a spatial reference which specifies the coordinate system that its coordinate values use.

Since
100
Note
This class represents an immutable geometry, it cannot be altered after being created. Use toBuilder (AGSGeometry): to get a builder using a copy of this geometry as a starting off point. The builder can then be modified to produce a new geometry.
See also
AGSGeometryBuilder for constructing or modifying geometries.
AGSGeometryEngine for performing operations on geometries.
Inheritance diagram for AGSGeometry:
AGSObject <AGSJSONSerializable> AGSEnvelope AGSMultipart AGSMultipoint AGSPoint AGSPolygon AGSPolyline

Instance Methods

(BOOL) - isEqualToGeometry:
 
(BOOL) - isEqualToGeometry:tolerance:
 
(AGSGeometryBuilder *) - toBuilder
 
(nullable id) - toJSON:
 

Class Methods

(nullable id< AGSJSONSerializable >) + fromJSON:error:
 

Properties

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

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

§ isEqualToGeometry:()

- (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:tolerance:()

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

§ toBuilder()

- (AGSGeometryBuilder*) 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
Since
100
Note
Any changes you make using the builder modifies its own internal copy of the geometry. It does not affect this geometry.

Implemented in AGSEnvelope, AGSPoint, AGSPolyline, AGSMultipoint, and AGSPolygon.

§ 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
readnonatomicassign

§ empty

- (BOOL) empty
readnonatomicassign

Indicates whether this geometry has any vertices.

Since
100

§ extent

- (AGSEnvelope*) extent
readnonatomicstrong

Smallest, rectangular bounding-box that covers the geometry.

Since
100

§ geometryType

- (AGSGeometryType) geometryType
readnonatomicassign

The type of this geometry.

Since
100

§ hasCurves

- (BOOL) hasCurves
readnonatomicassign

Indicates whether this geometry has curves.

Since
100

§ hasM

- (BOOL) hasM
readnonatomicassign

Indicates whether this geometry contains m (measure) values.

Since
100

§ hasZ

- (BOOL) hasZ
readnonatomicassign

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

Since
100

§ spatialReference

- (AGSSpatialReference*) spatialReference
readnonatomicstrong

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