AGSGeometryServiceTask Class Reference
Description
An instance of this class allows you to perform various frequently used geometric operations using a geometry service of ArcGIS Server. For example, http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer.
Geometric operations include :
- Buffer, project, and simplify geometries
- Calculate areas and lengths for geometries
- Determine spatial relations and label points
- Compute union, intersection, and difference between geometries
- Auto complete, generalize, reshape, offset, trim, extend and compute convex hulls of geometries
The input and output geometries are always packaged in arrays.
- Defined in:
- AGSGeometryServiceTask.h ( ArcGIS library)
- Since:
- 1.0
- See also:
- AGSGeometryServiceTaskDelegate
List of all members.
Member Function Documentation
Gets the area and length for each AGSPolygon
in the array. The delegate is notified when an operation completes successfully or encounters an error.
- Parameters:
-
| areasAndLengthsParams | Specifies the input polygons and ,optionally, the linear and areal units. |
- Returns:
NSOperation
for current request.
- Since:
- 1.0
- (NSOperation *) autoCompletePolygons: |
|
(NSArray *) |
polygons |
withPolylines: |
|
(NSArray *) |
polylines | |
|
|
| | |
Simplifies the process of constructing new polygons that are adjacent to other polygons. It constructs polygons that fill in the gaps between existing polygons and a set of polylines. The delegate is notified when an operation completes successfully or encounters an error.
- Parameters:
-
| polygons | An array of polygons that will provide some boundaries for new polygons. |
| polylines | An array of polylines that will provide the remaining boundaries for the new polygons. |
- Returns:
NSOperation
for current request.
- Availability:
- This feature is only available with services from ArcGIS Server 10.0 or above
- Since:
- 1.0
Creates buffer polygons at the specified distance around the given geometries. The delegate is notified when an operation completes successfully or encounters an error.
- Parameters:
-
| params | Specifies the input geometries, buffer distances, and other options |
- Returns:
NSOperation
for current request.
- Since:
- 1.0
- (NSOperation *) convexHullGeometries: |
|
(NSArray *) |
geometries |
|
|
Returns the convex hull of the input geometries. The input geometries can be points, multipoints, polylines, or polygons. The hull is typically a polygon but can also be a polyline or point in degenerate cases. The delegate is notified when the operation completes successfully or encounters an error.
- Parameters:
-
| geometries | Array of geometries whose convex hull is to be created. |
- Returns:
NSOperation
for current request.
- Availability:
- This feature is only available with services from ArcGIS Server 10.0 or above
- Since:
- 1.0
- (NSOperation *) cutGeometries: |
|
(NSArray *) |
geometries |
withGeometry: |
|
(AGSPolyline *) |
cutterGeometry | |
|
|
| | |
Splits the input polyline or polygon where it crosses a cutting polyline. The delegate is notified when an operation completes successfully or encounters an error.
- Parameters:
-
| geometries | The array of geometries to be cut. |
| cutterGeometry | The polyline that will be used to divide the target into pieces where it crosses the target. |
- Returns:
NSOperation
for current request.
- Availability:
- This feature is only available with services from ArcGIS Server 10.0 or above
- Since:
- 1.0
Densifies the input geometries by plotting points between existing vertices. The delegate is notified when an operation completes successfully or encounters an error.
- Parameters:
-
| densifyParams | The parameters to be used as input to the operation. |
- Returns:
NSOperation
for current request.
- Availability:
- This feature is only available with services from ArcGIS Server 10.0 or above
- Since:
- 1.0
- (NSOperation *) differenceGeometries: |
|
(NSArray *) |
geometries |
withGeometry: |
|
(AGSGeometry *) |
differenceGeometry | |
|
|
| | |
Constructs the set-theoretic difference between an array of geometries and another geometry. The delegate is notified when an operation completes successfully or encounters an error.
- Parameters:
-
| geometries | The array of geometries to be used as input for the difference operation. These should be an array of points, multipoints, polylines or polygons. |
| differenceGeometry | A single geometry of any type, of dimension equal to or greater than the elements of geometries . |
- Returns:
NSOperation
for current request.
- Availability:
- This feature is only available with services from ArcGIS Server 10.0 or above
- Since:
- 1.0
Measures the planar or geodesic distance between geometries. The delegate is notified when the operation completes successfully or encounters an error.
- Parameters:
-
| distanceParams | Sets the input geometries to measure, distance units and other parameters for the operation. |
- Returns:
NSOperation
for current request.
- Availability:
- This feature is only available with services from ArcGIS Server 10.0 or above
- Since:
- 1.0
Returns generalized (Douglas-Poiker) versions of the input geometries. The delegate is notified when an operation completes successfully or encounters an error.
- Parameters:
-
| generalizeParams | Sets the geometries, maximum deviation and units for the generalize operation. |
- Returns:
NSOperation
for current request.
- Availability:
- This feature is only available with services from ArcGIS Server 10.0 or above
- Since:
- 1.0
+ (id) geometryServiceTaskWithURL: |
|
(NSURL *) |
url |
|
|
Initialize an autoreleased Geometry service task.
- Parameters:
-
| url | URL to a geometry service. |
- Returns:
- A new, autoreleased, geometry service task object
- Since:
- 1.0
+ (id) geometryServiceTaskWithURL: |
|
(NSURL *) |
url |
credential: |
|
(AGSCredential *) |
cred | |
|
|
| | |
Initialize an autoreleased Geometry service task.
- Parameters:
-
| url | URL to a geometry service. |
| cred | AGSCredential used to access the secured resource. |
- Returns:
- A new, autoreleased, geometry service task object
- Since:
- 1.0
- (id) initWithURL: |
|
(NSURL *) |
url |
|
|
Initialize the task.
- Parameters:
-
| url | URL to a task resource in the ArcGIS Server REST Services Directory. |
- Returns:
- A new task object.
- Since:
- 1.0
- (id) initWithURL: |
|
(NSURL *) |
url |
credential: |
|
(AGSCredential *) |
cred | |
|
|
| | |
Initialize the task with a URL and credential to a secured resource.
- Parameters:
-
| url | URL to a task resource in the ArcGIS Server REST Services Directory. |
| cred | AGSCredential used to access secure resource. |
- Returns:
- A new task object.
- Since:
- 1.0
- (NSOperation *) intersectGeometries: |
|
(NSArray *) |
geometries |
withGeometry: |
|
(AGSGeometry *) |
intersectGeometry | |
|
|
| | |
Constructs the set-theoretic intersection between an array of geometries and another geometry. The delegate is notified when an operation completes successfully or encounters an error.
- Parameters:
-
| geometries | The array of geometries to be used as input for the intersection. These should be an array of points, multipoints, polylines or polygons. |
| intersectGeometry | A single geometry of any type, of dimension equal to or greater than the elements of geometries . |
- Returns:
NSOperation
for current request.
- Availability:
- This feature is only available with services from ArcGIS Server 10.0 or above
- Since:
- 1.0
- (NSOperation *) labelPointsForPolygons: |
|
(NSArray *) |
polygons |
|
|
Calculates an interior point for each AGSPolygon
in the array. These interior points can be used by clients to place labels for the polygons. The delegate is notified when an operation completes successfully or encounters an error.
- Parameters:
-
| polygons | The array of polygons to get label points for. |
- Returns:
NSOperation
for current request.
- Availability:
- This feature is only available with services from ArcGIS Server 9.3 Service Pack 1 or above
- Since:
- 1.0
Gets the length for each AGSPolyline
in the array. The delegate is notified when an operation completes successfully or encounters an error.
- Parameters:
-
| lengthsParams | Specifies the polylines and, optionally, the length unit and the geodesic length option. |
- Returns:
NSOperation
for current request.
- Since:
- 1.0
Offset constructs the offset of the given input geometries. If the offsetDistance
parameter is positive the constructed offset will be on the right side of the geometry. (Left side offsets are constructed with negative parameters.) Tracing the geometry from it's first vertex to the last will give you a direction along the geometry. It is to the right and left perspective of this direction that the positive and negative parameters will dictate where the offset is contructed. In these terms it is simple to infer where the offset of even horizontal geometries will be constructed. The offsetHow
parameter determines how outer corners between segments are handled. Rounded offset rounds the corner between extended offsets. Bevelled offset squares off the corner after a given ratio distance. Mitered offset attempts to allow extended offsets to naturally intersect, but if that intersection occurs too far from the corner, the corner is eventually bevelled off at a fixed distance. The delegate is notified when an operation completes successfully or encounters an error.
- Parameters:
-
| offsetParams | The parameters to be used as input to the operation. |
- Returns:
NSOperation
for current request.
- Availability:
- This feature is only available with services from ArcGIS Server 10.0 or above
- Since:
- 1.0
- (NSOperation *) projectGeometries: |
|
(NSArray *) |
geometries |
toSpatialReference: |
|
(AGSSpatialReference *) |
spatialReference | |
|
|
| | |
Projects the given geometries into a new spatial reference. All geometries must be of the same type - AGSPoint
, AGSMultipoint
, AGSPolygon
, AGSPolyline
, or AGSEnvelope
. The delegate is notified when an operation completes successfully or encounters an error.
- Parameters:
-
| geometries | The array of geometries to be projected. |
| spatialReference | The spatial reference to which geometries need to be projected. |
- Returns:
NSOperation
for current request.
- Since:
- 1.0
Computes pairs of geometries that satisfy the specified spatial relation. The relations are evaluated in 2-dimensions. Z coordinates are not used. Geometries in both arrays must have the same spatial reference. All geometries must be of the same type - AGSPoint
, AGSMultipoint
, AGSPolygon
, AGSPolyline
, or AGSEnvelope
. The delegate is notified when the operation completes successfully or encounters an error.
- Parameters:
-
| relationParams | The parameters to be used as input for the operation. |
- Returns:
NSOperation
for current request.
- Availability:
- This feature is only available with services from ArcGIS Server 9.3 Service Pack 1 or above
- Since:
- 1.0
Reshapes a polyline or a part of a polygon using a reshaping line. The delegate is notified when the operation completes successfully or encounters an error.
- Parameters:
-
| geometry | The polyline or polygon to be reshaped. |
| reshaper | The single-part polyline that does the reshaping. |
- Returns:
NSOperation
for current request.
- Availability:
- This feature is only available with services from ArcGIS Server 10.0 or above
- Since:
- 1.0
- (NSOperation *) simplifyGeometries: |
|
(NSArray *) |
geometries |
|
|
Simplifies the given geometries to make them topologically consistent according to their geometry type. All geometries must be of the same type - AGSPoint
, AGSMultipoint
, AGSPolygon
, or AGSPolyline
. The delegate is notified when an operation completes successfully or encounters an error.
- Parameters:
-
| geometries | The array of geometries to be simplified. |
- Returns:
NSOperation
for current request.
- Since:
- 1.0
This operation trims / extends each polyline specified in the input array, using the user specified guide polylines. When trimming features, the part to the left of the oriented cutting line is preserved in the output and the other part is discarded. An empty polyline is added to the output array if the corresponding input polyline is neither cut nor extended. The delegate is notified when an operation completes successfully or encounters an error.
- Parameters:
-
| trimExtendParams | The set the polylines and other parameters for the operation. |
- Returns:
NSOperation
for current request.
- Availability:
- This feature is only available with services from ArcGIS Server 10.0 or above
- Since:
- 1.0
- (NSOperation *) unionGeometries: |
|
(NSArray *) |
geometries |
|
|
The union operation constructs the set-theoretic union of the geometries in the input array. All inputs must be of the same type. The delegate is notified when the operation completes successfully or encounters an error.
- Parameters:
-
| geometries | The array of geometries to be unioned. |
- Returns:
NSOperation
for current request.
- Availability:
- This feature is only available with services from ArcGIS Server 10.0 or above
- Since:
- 1.0
Property Documentation
The credential to be used to access secured resources.
- Since:
- 1.0
Reimplemented from <AGSSecuredResource>.
Delegate to be notified when the task completes successfully or encounters an error.
- Since:
- 1.0
- (NSURL*) URL [read, copy, inherited] |
URL to a task resource in the ArcGIS Server REST Services Directory.
- Since:
- 1.0