Auto Complete

URL:
https://<root>/Utilities/Geometry/GeometryServer/autoComplete
Methods:
GET
Version Introduced:
10.0

Description

The autoComplete 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. This operation calls simplify on the input polygons and polylines. You can provide arguments to the autoComplete operation as query parameters defined in the following parameters table.

Request parameters

ParameterDetails

polygons

Specifies the array of polygons that provide some boundaries for the new polygons. The spatial reference of the polygons is specified by sr. The structure of the polygon in the array is the same as the structure of the JSON polygon objects returned by ArcGIS REST API.

Syntax

Use dark colors for code blocksCopy
1
[<polygon1>, <polygon2>, ..., <polygonN>]

Example:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[
  {
    "rings" :
    [
      [[-117,34],[-116,34],[-117,33],[-117,34]],
      [[-115,44],[-114,43],[-115,43],[-115,44]]
    ]
  },
  {
    "rings" :
    [
      [[32,17],[31,17],[30,17],[30,16],[32,17]]
    ]
  }
]

polylines

Specifies an array of polylines that 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 the same as the structure of JSON polyline objects returned by ArcGIS REST API.

Syntax

Use dark colors for code blocksCopy
1
[<polyline1>, <polyline2>, ..., <polylineN> ]

Example:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[
  {
    "paths" :
    [
      [[-117,34],[-116,34],[-117,33]],
      [[-115,44],[-114,43],[-115,43]]
    ]
  },
  {
    "paths" :
    [
      [[32,17],[31,17],[30,17],[30,16]]
    ]
  }
]

sr

Specifies the well-known ID (WKID) or a spatial reference JSON object for the input polygons and polylines. For a list of valid WKID values, see Using spatial references.

f

The response format. The default response format is html.

Values: html | json | pjson

Example usage

The following is a sample request URL for autoComplete that constructs completion lines between two parts of a multipart polygon:

Use dark colors for code blocksCopy
1
https://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/Geometry/GeometryServer/autoComplete?sr=4269&polygons=[{"rings":[[[0,0],[110,0],[110,-60],[0,-60],[0,0]],[[120,0],[180,0],[180,-60],[120,-60],[120,0]]]}]&polylines=[{"paths":[[[109,0],[121,0]],[[109,-60],[121,-60]]]}]&f=html

JSON Response syntax

Use dark colors for code blocksCopy
1
2
3
{
  "geometries" : [ <geometry1>, <geometry1>, ..., <geometryN> ]
}

JSON Response example

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
  "geometries": [
    {
      "rings": [
        [
          [
            120.00000000000011,
            -59.99999999999994
          ],
          [
            110.00000000000006,
            -59.99999999999994
          ],
          [
            110.00000000000006,
            5.6843418860808015E-14
          ],
          [
            120.00000000000011,
            5.6843418860808015E-14
          ],
          [
            120.00000000000011,
            -59.99999999999994
          ]
        ]
      ],
      "spatialReference": {
        "wkid": 4269,
        "latestWkid": 4269
      }
    }
  ]
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.