FRAMES | NO FRAMES Description | Parameters | Examples | Response
Auto Complete (Operation)

This is an archive of a previous version of the ArcGIS REST API. The current version can be found at http://resources.arcgis.com/en/help/arcgis-rest-api/

URL http://<geometryservice-url>/autoComplete
Parent Resource Geometry Service

Description

The Auto Complete operation is performed on a geometry service resource. The AutoComplete operation 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.

You can provide arguments to the autoComplete operation as query parameters defined in the parameters table below.

Parameters

Parameter Details
f Description: The response format. The default response format is html.

Values: html | json
polygons Description:  The array of polygons that will provide some boundaries for new polygons. The spatial reference of the polygons is specified by sr. The structure of the polygon in the array is same as the structure of the JSON polygon objects returned by the ArcGIS REST API.

Syntax and Examples:

JSON Structures:

Syntax:

Example:

[
 {
  "rings" : [
   [[-117,34],[-116,34],[-117,33],[-117,34]],
   [[-115,44],[-114,43],[-115,43],[-115,44]]
  ]
 },
 {
  "rings" : [
   [[32.49,17.83],[31.96,17.59],[30.87,17.01],[30.11,16.86],[32.49,17.83]]
  ]
 }
]
polylines Description: An array of polylines that will provide the remaining boundaries for new polygons. The spatial reference of the polylines is specified by sr. The structure of polylines in the array is same as the the structure of JSON polyline objects returned by the ArcGIS REST API.

Syntax and Examples:

JSON Structures:

Syntax:

Example:

[
 {
  "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]]
  ]
 }
]
sr Description: The well-known ID or a spatial reference json object for the input polygons and polylines. For a list of valid WKID values, see Projected coordinate Systems and Geographic coordinate Systems.

Example Usage

Example 1:
http://sampleserver3.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer/autoComplete?sr=4269&polygons=[{%22rings%22%3A[[[0%2C0]%2C[110%2C0]%2C[110%2C-60]%2C[0%2C-60]%2C[0%2C0]]%2C[[120%2C0]%2C[180%2C0]%2C[180%2C-60]%2C[120%2C-60]%2C[120%2C0]]]}]&polylines=[{%22paths%22%3A[[[109%2C0]%2C[121%2C0]]%2C[[109%2C-60]%2C[121%2C-60]]]}]&f=HTML

JSON Response Syntaxe Syntax

{
"geometries" : [
<polygon1>, <polygon2> ]
}

JSON Response Example

{
  "geometries" : 
  [
 {
  "rings" : [
   [[-117,34],[-116,34],[-117,33],[-117,34]],
   [[-115,44],[-114,43],[-115,43],[-115,44]]
  ]
 },
 {
  "rings" : [
   [[32.49,17.83],[31.96,17.59],[30.87,17.01],[30.11,16.86],[32.49,17.83]]
  ]
 }
]
}