FRAMES | NO FRAMES | Description | Parameters | Examples | Response |
URL | http://<geometryservice-url>/relation |
---|---|
Parent Resource | Geometry Service |
Note: The Relation operation was added at 9.3 SP1.
The relation operation is performed on a geometry service resource. This operation determines the pairs of geometries from the input geometry arrays that participate in the specified spatial relation.
This operation computes the set of pairs of geometries from geometries1
and geometries2
that belong to the specified relation.
Both arrays are assumed to be in the spatial reference specified by sr
, which is a required parameter.
The relations are evaluated in 2D. Z coordinates are not used. Geometry types cannot be mixed within an array.
From 10.1 onwards this operation will call Simplify on the input geometries1
and geometries2
.
You can provide arguments to the relation operation as query parameters defined in the parameters table below.
Parameter | Details |
---|---|
f | Description: The
response format. The default response format is html. Values: html | json |
geometries1 | Description: The
first array of geometries to compute the relations. The structure of each geometry in the array is
same as the structure of the json
geometry objects
returned by the ArcGIS REST API. Syntax and Examples: JSON Structures:Syntax:{ The
{ URL based:For a large set of geometries, you can specify a URL to the input geometries stored in a JSON structure in a file on a public server. The expected format of the file’s contents will be exactly the same as that expected if the geometries were directly embedded in the request.
Syntax: |
geometries2 | Description: The
second array of geometries to compute the relations. The structure of each geometry in the array is
same as the structure of the json
geometry objects
returned by the ArcGIS REST API. Syntax and Examples: JSON Structures:Syntax:{ The
{ URL based:For a large set of geometries, you can specify a URL to the input geometries stored in a JSON structure in a file on a public server. The expected format of the file’s contents will be exactly the same as that expected if the geometries were directly embedded in the request.
Syntax: |
sr | Description: The well-known ID of the spatial reference or a spatial reference json object for the input geometries. For a list of valid WKID values, see Projected coordinate Systems and Geographic coordinate Systems. |
relation |
Description: The spatial relationship to be tested between the two input geometry arrays.
Values:
esriGeometryRelationCross | esriGeometryRelationDisjoint | esriGeometryRelationIn | esriGeometryRelationInteriorIntersection |
esriGeometryRelationIntersection | esriGeometryRelationLineCoincidence | esriGeometryRelationLineTouch | esriGeometryRelationOverlap |
esriGeometryRelationPointTouch | esriGeometryRelationTouch | esriGeometryRelationWithin | esriGeometryRelationRelation
Note that if the relation is specified as esriGeometryRelationRelation , the relationParam parameter
describes the spatial relationship and must be specified.
|
relationParam |
Description: The 'Shape Comparison Language' string to be evaluated.
Strings such as RELATE(G1, G2, "FFFTTT***") are accepted, in addition to other kinds of strings.
This string describes the spatial relationship to be tested when the relation parameter is specified as
esriGeometryRelationRelation .
See the following EDN topic for more details on the Shape Comparison Language. |
Example 1: This example determines which of the 2 input points lie within the input polygon:
Example 2: Example using a Shape Comparison Language string (relationParam):
{ "relations" : [ { "geometry1Index" : <geometry1Index1>, "geometry2Index" : <geometry2Index1> }, { "geometry1Index" : <geometry1Index2>, "geometry2Index" : <geometry2Index2> } ] }
{ "relations" : [ { "geometry1Index" : 0, "geometry2Index" : 1 }, { "geometry1Index" : 1, "geometry2Index" : 1 } ] }