| ArcGIS Runtime SDK for iOS
    100.15
    | 
Base class for all classes that represent geometric shapes.
AGSGeometry is the base class for two-dimensional (x,y) or three-dimensional (x,y,z) geometries. Objects that inherit from the AGSGeometry class may also include a measure (m-value) for each vertex. The AGSGeometry class provides functionality common to all types of geometry. AGSPoint, AGSMultipoint, AGSPolyline, AGSPolygon, and AGSEnvelope all inherit from AGSGeometry and represent different types of shapes.
AGSGeometry represents real-world objects by defining a shape at a specific geographic location. It is used throughout the API to represent the shapes of features and graphics, layer extents, viewpoints, and GPS locations. It is also used, for example, to define inputs and outputs for spatial analysis and geoprocessing operations and to measure distances and areas.
All types of geometry:
AGSSpatialReference indicating the coordinate system used by its coordinates Immutability:
Most geometries are created and not changed for their lifetime. Examples include features created to be stored in a geodatabase or read from a non-editable layer, and features returned from tasks such as a spatial query, geocode operation, network trace, or geoprocessing task. Immutable geometries (geometries that cannot be changed) offer some important benefits to your app. They are inherently thread-safe, help prevent inadvertent changes, and allow for certain performance optimizations.
Instead of changing the properties of existing geometries, you can create and update geometries using the various subclasses of AGSGeometryBuilder (for example, AGSPolygonBuilder), which can represent the state of a geometry under construction while allowing modifications, thus enabling editing workflows.
Additionally, AGSGeometryEngine offers a range of topological and spatial transformations that read the content of existing geometries and create new geometries, for example, project, buffer, union, and so on. Relational tests such as intersects and overlaps are also available on AGSGeometryEngine.
Coordinate units:
The coordinates that define a geometry are only meaningful in the context of the geometry's AGSSpatialReference. The vertices and spatial reference together allow your app to translate a real-world object from its location on the Earth to its location on your map or scene.
In some cases, a geometry's spatial reference may not be set. For example, an AGSGraphic that does not have a spatial reference is drawn using the same spatial reference as the AGSMapView to which it was added. If the coordinates are in a different spatial reference, the graphics may not display in the correct location, or at all.
Spatial reference and projection:
Changing the coordinates of a geometry to have the same shape and location represented using a different AGSSpatialReference is known as "projection" or sometimes as "reprojection". Because geometries are immutable, they do not have any member methods that project, transform, or otherwise modify their content.
AGSGeometryEngine for performing operations on geometries AGSGeometryBuilder for constructing or modifying geometries  
  
| Instance Methods | |
| (BOOL) | - isEqualToGeometry: | 
| (BOOL) | - isEqualToGeometry:tolerance: | 
| (AGSGeometryBuilder *) | - toBuilder | 
| (nullable id) | - toJSON: | 
| Class Methods | |
| (nullable id< AGSJSONSerializable >) | + fromJSON:error: | 
| Properties | |
| AGSGeometryDimension | dimension | 
| BOOL | empty | 
| AGSEnvelope * | extent | 
| AGSGeometryType | geometryType | 
| BOOL | hasCurves | 
| BOOL | hasM | 
| BOOL | hasZ | 
| AGSSpatialReference * | spatialReference | 
| NSDictionary< NSString *, id > * | unknownJSON | 
| NSDictionary< NSString *, id > * | unsupportedJSON | 
| 
 | staticrequiredinherited | 
Initializes and returns an object from its JSON representation.
| JSONObject | NSDictionaryorNSArraycontaining the JSON. | 
| error | encountered during the operation, if any. | 
| - (BOOL) isEqualToGeometry: | (AGSGeometry *) | other | 
Compares whether two geometries are equal.
| other | The other geometry object to compare this geometry object to. | 
YES if the geometries are equal. | - (BOOL) isEqualToGeometry: | (AGSGeometry *) | other | |
| tolerance: | (double) | tolerance | |
Compares two geometry objects for equality to within some tolerance.
| other | The other geometry object to compare this geometry object to. | 
| tolerance | The tolerance. | 
YES if the geometries are equal within the given tolerance, otherwise NO. | - (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.
Implemented in AGSPolyline, AGSPolygon, AGSPoint, AGSMultipoint, and AGSEnvelope.
| 
 | requiredinherited | 
Returns JSON representation for this object.
| error | encountered during the operation, if any. | 
NSDictionary or NSArray containing the JSON. Reimplemented in AGSPortalItem.
| 
 | readnonatomicassign | 
The dimension of this geometry object.
AGSGeometryDimension::AGSGeometryDimensionUnknown if an error occurs. | 
 | readnonatomicassign | 
Indicates whether this geometry has any vertices.
| 
 | readnonatomicstrong | 
Smallest, rectangular bounding-box that covers the geometry.
| 
 | readnonatomicassign | 
The type of this geometry.
| 
 | readnonatomicassign | 
YES if this geometry contains curve segments, NO otherwise.
The ArcGIS Platform supports polygon and polyline geometries that contain curve segments (where AGSSegment::curve is YES, sometimes known as true curves or nonlinear segments). Curves may be present in certain types of data - for example Mobile Map Packages (MMPK) or geometry JSON. When connecting to ArcGIS feature services that support curves (AGSArcGISFeatureServiceInfo::supportsTrueCurve), ArcGIS Runtime retrieves densified versions of curve feature geometries by default.
If a polygon or polyline geometry contains curve segments, this property is YES. Prior to v100.12, it was not possible to access curve segments, and only AGSLineSegment instances would be returned when iterating through the segments in an AGSPolygon or AGSPolyline object, irrespective of this property.
From v100.12, you can use curve segments when using an AGSMultipartBuilder to create or edit polygon and polyline geometries, and also get curve segments when iterating through the segments of existing AGSMultipart geometries when this property returns YES. You can also choose to return true curves from feature services by using AGSArcGISRuntimeEnvironment::serviceCurveGeometryMode. 
AGSGeometryBuilder::hasCurves, AGSPart::hasCurves, AGSSegment::curve, AGSCubicBezierSegment, AGSEllipticArcSegment | 
 | readnonatomicassign | 
Indicates whether this geometry contains m (measure) values.
| 
 | readnonatomicassign | 
Indicates whether this geometry contains z coordinate values. Only 3D geometries contain z values.
| 
 | readnonatomicstrong | 
The spatial reference associated with the gometry. It specifies the coordinate system for the geometry's x, y, and z coordinate values.
| 
 | readrequirednonatomiccopyinherited | 
A dictionary of values that was in the source JSON but was unparsed by API.
NSDictionary containing the unknown JSON. | 
 | readnonatomiccopyinherited | 
A dictionary of values that are supported by the REST API, but not exposed through the SDK API.
NSDictionary containing the unsupported JSON.