Intersect
- URL:http:// <geometryservice-url>/intersect
- Version Introduced:10.0
Description
The intersect operation is performed on a geometry service resource. This operation constructs the set-theoretic intersection between an array of geometries and another geometry. The dimension of each resultant geometry is the minimum dimension of the input geometry in the geometries array and the other geometry specified by the geometry parameter.
From 10.1 onwards this operation will call Simplify on the input geometries and geometry.
You can provide arguments to the intersect operation as query parameters defined in the parameters table below.
Request Parameters
Parameter |
Details |
---|---|
f |
Description: The response format. The default response format is html. Values: html | json |
geometries |
Description: An array of points, multipoints, polylines or polygons. The structure of each geometry in the array is the same as the structure of the json geometry objects returned by the ArcGIS REST API. JSON Structures: Syntax:
Example:
|
geometry |
Description: A single geometry of any type with dimension equal to or greater than the elements of geometries. The structure of geometry is same as the structure of the JSON geometry objects returned by the ArcGIS REST API. The use of simple syntax is not supported. JSON Structures: Syntax:
Example:
|
sr |
Description: The well-known ID 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. |
Example Usage
Example1: Calculate Intersection of two polygons
JSON Response Syntax
{
"geometryType" : "<esriGeometryPoint | esriGeometryMultipoint | esriGeometryPolyline | esriGeometryPolygon>"
"geometries" : [ <geometry1>, <geometry1>, ..., <geometryN> ]
}
JSON Response Example
{
"geometryType": "esriGeometryPolygon",
"geometries": [
{
"rings": [
[
[
-70.999999999999943,
39.000000000000057
],
[
-71.999999999999943,
39.000000000000057
],
[
-71.999999999999943,
40.000000000000057
],
[
-70.999999999999943,
39.000000000000057
]
]
]
},
{
"rings": [
[
[
-72.999999999999943,
38.000000000000057
],
[
-73.999999999999943,
38.000000000000057
],
[
-73.999999999999943,
40.000000000000057
],
[
-72.999999999999943,
39.000000000000057
],
[
-72.999999999999943,
38.000000000000057
]
]
]
}
]
}