Spatial Relation

The “relation” operation allows to remotely determine the pairs of geometries from the two input arrays that participate in the relation specified by the user

Example of request:

http://galileo.icc.cat/arcgis/rest/services/Utilities/Geometry/GeometryServer/relation?sr=25831&geometries1={"geometryType":"esriGeometryPolyline","geometries":[{"paths":[[[417800,4584900],[418600,4584900]]]}]}&geometries2={"geometryType":"esriGeometryPolygon","geometries":[{"rings":[[[418000,4584800],[418000,4585000],[418500,4585000],[418500,4585000],[418000,4584800]]]}]}&relation=esriGeometryRelationCross&relationParam=&f=json&token=WgTR74xQdSvkHVECel6pSEijFKWafsP3g9DLA8WYg1sD3ycDBOx4g-Vj_i4xHhus

and related response:

{"relations": [{
 "geometry1Index": 0,
 "geometry2Index": 0
}]}

Service Parameters:

Parameter

Descripción

f

Response format

Valid values: html | json
Default value: html

geometries1

The first array of geometries of which the relation is wanted to be determined.

The syntax of this parameter should be:

{
"geometryType" : ""
"geometries" : [ , ]
}

geometries2

The second array of geometries of which the relation is wanted to be determined.

The syntax of this parameter should be:

{
"geometryType" : ""
"geometries" : [ , ]
}

sr

Reference system identifier related to geometries

relation

The spatial relationship to be tested  between the two geometries.

Valued values:

esriGeometryRelationCross | esriGeometryRelationDisjoint | esriGeometryRelationIn | esriGeometryRelationInteriorIntersection | esriGeometryRelationIntersection | esriGeometryRelationLineCoincidence | esriGeometryRelationLineTouch | esriGeometryRelationOverlap | esriGeometryRelationPointTouch | esriGeometryRelationTouch | esriGeometryRelationWithin | esriGeometryRelationRelation

Additional information

relationParam

Array of texts expressed in ‘Shape Comparison Language’, that determines the tipy of relation to be tested when the geometric value ‘esriGeometryRelationRelation’ at the parameter ‘relation’.

Additional information

token

Required security key in order to perform this function which is generated by filling in the corresponding form.

Additional information