Instances of this class represents engines that can perform geometric operations locally on the device. `AGSGeometryEngine`

is functionally similar to `AGSGeometryServiceTask`

except that it does not rely on a remote ArcGIS Server Geometry Service. You can use the engine even when the device does not have any network connectivity.

**Since:**- 1.8

- (double) areaOfGeometry: | (AGSGeometry*) | geometry |

Gets the simple area for the AGSGeometry passed in. The geometry must be topologically correct to get its accurate legth. Geometries returned by ArcGIS Server services are always correct. If you construct geometries programmatically or using the sketch layer, or if you modify geometries returned by ArcGIS Server, you should simplify them using `simplifyGeometry:`

**Parameters:**-
*geometry*The geometry to calculate the area for.

**Returns:**- The computed area in the same units as the geometry's spatial reference unit.

**Since:**- 1.8

- (AGSMutablePolygon *) bufferGeometries: | (NSArray*) | geometries |
||

byDistance: | (double) | distance | ||

Creates buffers at the specified distance around the given geometries. Will union the results of all buffers.

**Parameters:**-
*geometries*Specifies the input geometries. *distance*The distance in the unit of the geometry's spatial reference for which to buffer the geometries.

**Returns:**- The polygon that represents the buffered area.

**Since:**- 1.8

- (AGSMutablePolygon *) bufferGeometry: | (AGSGeometry*) | geometry |
||

byDistance: | (double) | distance | ||

Creates a buffer polygon at the specified distance around the given geometry.

**Parameters:**-
*geometry*Specifies the input geometry. *distance*The distance in the unit of the geometry's spatial reference for which to buffer the geometry.

**Returns:**- The polygon that represents the buffered area.

**Since:**- 1.8

- (NSArray *) cutGeometry: | (AGSGeometry*) | geometry |
||

withCutter: | (AGSPolyline*) | cutter | ||

Splits the input polyline or polygon where it crosses a cutting polyline.

**Parameters:**-
*geometry*The geometry to be cut. *cutter*The polyline that will be used to divide the target into pieces where it crosses the target.

**Returns:**- Array of cut results.

**Since:**- 1.8

+ (AGSGeometryEngine *) defaultGeometryEngine |

A singleton geometry engine that can be used. Since an instance of a geometry engine caches state, like the last projection transformation used, it may be beneficial to create one for each spatial reference that you are dealing with, instead of using this.

**Returns:**- A new, autoreleased geometry engine.

**Since:**- 1.8

- (AGSGeometry *) densifyGeometry: | (AGSGeometry*) | geometry |
||

withMaxSegmentLength: | (double) | maxSegmentLength | ||

Densifies the input geometry by plotting points between existing vertices.

**Parameters:**-
*geometry*The input geometry *maxSegmentLength*The maximum distance between points after densification. This distance should be in the same unit as the geometry's spatial reference.

**Returns:**- The densified geometry.

**Since:**- 1.8

- (AGSGeometry *) differenceOfGeometry: | (AGSGeometry*) | geometry1 |
||

andGeometry: | (AGSGeometry*) | geometry2 | ||

Constructs the set-theoretic difference between two geometries.

**Parameters:**-
*geometry1*The first geometry. *geometry2*The second geometry of dimension equal to or greater than the elements of the first geometry.

**Returns:**- A geometry that represents the difference of the two input geometries.

**Since:**- 1.8

- (double) distanceFromGeometry: | (AGSGeometry*) | geometry1 |
||

toGeometry: | (AGSGeometry*) | geometry2 | ||

Measures the simple planar distance between two geometries.

**Parameters:**-
*geometry1*The first geometry. *geometry2*The second geometry.

**Returns:**- The distance between the two input geometries in the same unit as the spatial reference of the input geometries.

**Since:**- 1.8

- (AGSGeometry *) geodesicDensifyGeometry: | (AGSGeometry*) | geometry |
||

withMaxSegmentLength: | (double) | maxSegmentLength |
||

inUnit: | (AGSSRUnit) | lengthUnit | ||

Densifies the input geometry by plotting points between existing vertices.

**Parameters:**-
*geometry*The input geometry *maxSegmentLength*The maximum distance between points after densification. *lengthUnit*The unit that the max segment length parameter is in.

**Returns:**- The geodesically densified geometry.

**Since:**- 1.8

- (double) geodesicLengthOfGeometry: | (AGSGeometry*) | geometry |
||

inUnit: | (AGSSRUnit) | lengthUnit | ||

Gets the geodesic length for the AGSGeometry passed in. Will return NAN if the calculation results in a linear to angular conversion (for instance, Decimal Degrees to Meters)

**Parameters:**-
*geometry*The geometry to calculate the geodesic length for. *lengthUnit*The unit at which the area is calculated.

**Returns:**- The calculated geodesic length in the specified unit.

**Since:**- 1.8

- (BOOL) geometry: | (AGSGeometry*) | geometry1 |
||

containsGeometry: | (AGSGeometry*) | geometry2 | ||

Returns YES if geometry1 contains geometry2.

**Since:**- 1.8

- (BOOL) geometry: | (AGSGeometry*) | geometry1 |
||

crossesGeometry: | (AGSGeometry*) | geometry2 | ||

Returns YES if geometry1 crosses geometry2.

**Since:**- 1.8

- (BOOL) geometry: | (AGSGeometry*) | geometry1 |
||

disjointToGeometry: | (AGSGeometry*) | geometry2 | ||

Returns YES if geometry1 is disjoint to geometry2.

**Since:**- 1.8

- (BOOL) geometry: | (AGSGeometry*) | geometry1 |
||

intersectsGeometry: | (AGSGeometry*) | geometry2 | ||

Returns YES if geometry1 intersects geometry2.

**Since:**- 1.8

- (BOOL) geometry: | (AGSGeometry*) | geometry1 |
||

touchesGeometry: | (AGSGeometry*) | geometry2 | ||

Returns YES if geometry1 touches geometry2.

**Since:**- 1.8

- (BOOL) geometry: | (AGSGeometry*) | geometry1 |
||

withinGeometry: | (AGSGeometry*) | geometry2 | ||

Returns YES if geometry1 is within geometry2.

**Since:**- 1.8

- (AGSGeometry *) intersectionOfGeometry: | (AGSGeometry*) | geometry1 |
||

andGeometry: | (AGSGeometry*) | geometry2 | ||

Constructs the set-theoretic intersection between two geometries.

**Parameters:**-
*geometry1*The first geometry. *geometry2*The second geometry of dimension equal to or greater than the elements of the first geometry.

**Returns:**- A geometry that represents the intersection of the two input geometries.

**Since:**- 1.8

- (AGSMutablePoint *) labelPointForPolygon: | (AGSPolygon*) | polygon |

Calculates an interior point for a specified polygon. This interior point can be used by clients to place a label for the polygon.

**Parameters:**-
*polygon*The polygon to get label points for.

**Returns:**- The label point.

**Since:**- 1.8

- (double) lengthOfGeometry: | (AGSGeometry*) | geometry |

Gets the length for a specified `AGSGeometry`

. The geometry must be topologically correct to get its accurate legth. Geometries returned by ArcGIS Server services are always correct. If you construct geometries programmatically or using the sketch layer, or if you modify geometries returned by ArcGIS Server, you should simplify them using `simplifyGeometry:`

**Parameters:**-
*geometry*The geometry to calculate the length for.

**Returns:**- The calculated length in the same units as the geometry's spatial reference unit.

**Since:**- 1.8

- (AGSProximityResult *) nearestCoordinateInGeometry: | (AGSGeometry*) | geometry |
||

toPoint: | (AGSPoint*) | point | ||

Finds the nearest coordinate in a specified geometry to a specified point.

**Parameters:**-
*geometry*The geometry in which the nearest coordinate to a specified point is to be found. *point*The point which to find the nearest coordinate to.

**Returns:**- The proximity result.

**Since:**- 1.8

- (AGSProximityResult *) nearestVertexInGeometry: | (AGSGeometry*) | geometry |
||

toPoint: | (AGSPoint*) | point | ||

Finds the nearest vertex in a specified geometry to a specified point.

**Parameters:**-
*geometry*The geometry in which the nearest vertex to a specified point is to be found. *point*The point which to find the nearest vertex to.

**Returns:**- The proximity result.

**Since:**- 1.8

- (AGSGeometry *) normalizeCentralMeridianOfGeometry: | (AGSGeometry*) | geometry |

Folds the geometry into a range of 360 degrees. This may be necessary when wrap around is enabled on the map.

**Parameters:**-
*geometry*The geometry that you want folded.

**Returns:**- The folded geometry

**Since:**- 1.8

- (AGSGeometry *) offsetGeometry: | (AGSGeometry*) | geometry |
||

byDistance: | (double) | distance |
||

withJointType: | (AGSGeometryOffsetType) | joinType |
||

bevelRatio: | (double) | bevelRatio |
||

flattenError: | (double) | flattenError | ||

Creates offset version of the input geometries.

The offset operation creates a geometry that is a constant distance from an input polyline or polygon. It is similar to buffering, but produces a one sided result. If offsetDistance > 0, then the offset geometry is constructed to the right of the oriented input geometry, otherwise it is constructed to the left. For a simple polygon, the orientation of outer rings is clockwise and for inner rings it is counter clockwise. So the “right side” of a simple polygon is always its inside. The bevelRatio is multiplied by the offset distance and the result determines how far a mitered offset intersection can be from the input curve before it is beveled.

**Parameters:**-
*geometry*The geometry to calculate offset for. Point and MultiPoint are not supported. *distance*The offset distance for the Geometries. *joinType*The join type of the offset geometry. *bevelRatio*The ratio used to produce a bevel join instead of a miter join (used only when joins is Miter) *flattenError*The maximum distance of the resulting segments compared to the true circular arc (used only when joins is Round). If flattenError is 0, tolerance value is used. Also, the algorithm never produces more than around 180 vetices for each round join.

**Returns:**- Returns the result of the offset operation.

**Since:**- 1.8

- (AGSGeometry *) projectGeometry: | (AGSGeometry*) | geometry |
||

toSpatialReference: | (AGSSpatialReference*) | spatialReference | ||

Projects the given geometry into a new spatial reference.

**Parameters:**-
*geometry*The geometry to be projected. *spatialReference*The spatial reference to which geometry need to be projected.

**Returns:**- The projected geometry

**Since:**- 1.8

- (AGSGeometry *) simplifyGeometry: | (AGSGeometry*) | geometry |

Simplifies the given geometry to make it topologically consistent according to their geometry type. For instance, it rectifies polygons that may be self-intersecting, or contain incorrect ring orientations.

**Parameters:**-
*geometry*The geometry to be simplified.

**Returns:**- The simplified geometry.

**Since:**- 1.8

- (AGSGeometry *) unionGeometries: | (NSArray*) | geometries |

The union operation constructs the set-theoretic union of the geometries in the input array.

**Parameters:**-
*geometries*The array of geometries to be unioned.

**Returns:**- The union of all the input geometries.

**Since:**- 1.8