FRAMES | NO FRAMES | Description | Parameters | Examples | Response |
URL | http://<geometryservice-url>/intersect |
---|---|
Parent Resource | Geometry Service |
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
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.
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
same as the structure of the json
geometry objects
returned by the ArcGIS REST API. Syntax and Examples: JSON Structures:Syntax:{ { "geometryType" : "esriGeometryPolyline", "geometries" : [ { "paths" : [ [[-117,34],[-116,34],[-117,33]], [[-115,44],[-114,43],[-115,43]] ] }, { "paths" : [ [[32.49,17.83],[31.96,17.59],[30.87,17.01],[30.11,16.86]] ] } ] } |
geometry | Description: A single geometry of any type, of 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. Syntax and Examples: JSON Structures:Syntax:{ { |
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 1: Calculate Intersection of two polygons
http://sampleserver3.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer/intersect?sr=4269&geometries={"geometryType" : "esriGeometryPolygon","spatialReference" :{"wkid" : 4269},"geometries" :[{"rings" : [[[-75.48928066099995,39.714858219000064],[-75.4759742679999,39.720084384000074],[-75.47476845699993,39.741832093000085],[-75.46039411899994,39.763362027000085],[-74.73882472699995,40.17772564400008],[-74.9166543419999,39.17063854200006],[-75.01440707699993,39.198363837000045],[-75.11995811199995,39.18469178100008],[-75.4156722749999,39.374971842000036],[-75.55276303999995,39.49051430700007],[-75.5166888839999,39.56656841600005],[-75.57023418699993,39.61773496300009],[-75.48928066099995,39.714858219000064]]]}]}&geometry={"geometryType" : "esriGeometryPolygon","spatialReference" :{"wkid" : 4269},"geometry" :{"rings" : [[[-75.48928066099995,39.714858219000064],[-75.4759742679999,39.720084384000074],[-75.47476845699993,39.741832093000085],[-75.46039411899994,39.763362027000085],[-74.73882472699995,40.17772564400008],[-75.48928066099995,39.714858219000064]]]}}&f=html{
"geometryType" : "<esriGeometryPoint | esriGeometryMultipoint | esriGeometryPolyline | esriGeometryPolygon>"
"geometries" : [ <geometry1>, <geometry2> ]
}
{ "geometryType" : "esriGeometryPolygon", "geometries" : [ { "rings" : [ [ [-75.475803134, 39.7231709100001], [-75.474768457, 39.741832093], [-75.4603941189999, 39.763362027], [-74.738824727, 40.1777256440001], [-75.475803134, 39.7231709100001] ] ] } ] }