Calculate Extent

URL:
https://<root>/<serviceName>/TopographicProductionServer/calculateExtent
Methods:
GET
Required Capability:
Requires an ArcGIS GIS Server Advanced license and a Production Mapping or Defense Mapping server extension license
Version Introduced:
10.9.1

Description

The calculateExtent operation calculates a custom area of interest (AOI) for a given product and version. The extents property value in the JSON response can be used as the value for the customAoi parameter of the generateProduct operation.

Request parameters

ParameterDetails

productName

(Required)

The name of the product.

This value must match a name from https://<topographicProductionServer-url>/products.

productVersion

(Required)

The version of the product to generate. This value must match a name from the productVersion property in https://<topographicProductionServer-url>/products.

aoiLayer

(Required)

The URL of the layer defining the product's area of interest.

inputGeometry

(Required)

A geometry defining the center of the custom extent. Only a point geometry is supported at the current release.

outSpatialReference

(Required)

The coordinate system for the extent that is returned.

Response properties

PropertyDetails

success

Indicates if the operation was successful.

Values: true | false

Example usage

Request URL and parameters:

Use dark colors for code blocksCopy
1
https://machine.domain.com/server/rest/services/SampleService/TopographicProductionServer/calculateExtent
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
productName=TM50
productVersion=TDS_7_1
aoiLayer=https://machine.domain.com/server/rest/services/AOIs/MapServer/1
inputGeometry={
  "spatialReference":{
    "latestWkid":3857,
    "wkid":102100
  },
  "x":-8028806.305443563,
  "y":2138929.6964067533
}
outSpatialReference={"latestWkid":3857,"wkid":102100}
f=json

JSON Response syntax

The following is the syntax of a response:

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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{
  "productName": <name of the product>,
  "productVersion": <version of the product>,
  "gridXml": <grid XML file used in building the custom extent>,
  "layoutProperties":
  {
    "name": <name of the layout template associated with the product>,
    "width": <width of the layout template associated with the product>,
    "height": <height of the layout template associated with the product>,
    "units":
    {
      "uwkid": <well-known id of the unit>
    }
  },
  "map":
  {
    "name": <name of the map used to build the custom extent>,
    "width": <width of the map frame and initial width of custom extent>,
    "height": <height of the map frame and initial height of custom extent>,
    "scale": <scale of the map>
  },
  "extents": <feature set representing the extents calculated, currently only one extent is allowed to be returned>
  {
    "geometryType": <geometry type of the extent>,
    "spatialReference":
    {
      "wkid": <well-known id>,
      "latestWkid": <latest well-known id>
    },
    "fields": [
      {
        "name": <name of the field>,
        "type": <type of field>,
        "alias": <alias of the field>
      },
      ...
    ],
    "features": [
      {
        "attributes":
        {
          "OBJECTID": <id of the object>,
          ...
        },
        "geometry":
        {
          "rings":
        }
      }
    ]
  },
  "success": true | false
}

JSON Response example

The following is an example of a successful response:

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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{
  "productName": "TM50",
  "productVersion": "TDS_7_1",
  "gridXml": "TM50_BaseMap_Zipper-Left.xml",
  "layoutProperties":
  {
    "name": "TM50_Layout",
    "width": 635,
    "height": 774.70000000000005,
    "units":
      {
        "uwkid": 1025
      }
  },
  "map":
  {
    "name": "BaseMap",
    "width": 556.79959869384766,
    "height": 552.79909896850586,
    "scale": 50000
  },
  "extents":
  {
    "geometryType": "esriGeometryPolygon",
    "spatialReference":
    {
      "wkid": 102100,
      "latestWkid": 3857
    },
    "fields":
    [
      {
        "name": "OBJECTID",
        "type": "esriFieldTypeOID",
        "alias": "OBJECTID"
      },
      ...
    ],
    "features":
    [
      {
        "attributes":
        {
          "OBJECTID": 1,
          ...
        },
        "geometry":
        {
          "rings":
          [
            [-8043489.58459999971, 2124251.45230000094],
            [-8043511.36969999969, 2153607.65269999951],
            [-8014101.26469999924, 2153604.59160000086],
            [-8014123.04659999907, 2124254.51069999859],
            [-8043489.58459999971, 2124251.45230000094]
          ]
        }
      }
    ]
  },
  "success": true
}

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