- URL:
- https://<root>/<serviceName>/TopographicProductionServer/calculateExtent
- Methods:
- GET
- Related Resources:
- Generate Product
- 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 calculate operation calculates a custom area of interest (AOI) for a given product and version. The result can be specified as the value for the custom parameter of the generate operation.
Request parameters
| Parameter | Details | 
|---|---|
| 
 (Required) | The name of the product. This value must match a name from  | 
| 
 (Required) | The version of the product to generate.
This value must match a name from the  | 
| 
 (Required) | The URL of the layer defining the product's area of interest. | 
| 
 (Required) | A geometry defining the center of the custom extent. Only a point geometry is supported at the current release. | 
| 
 (Required) | The coordinate system for the extent that is returned. | 
Response properties
| Property | Details | 
|---|---|
| 
 | Indicates if the operation was successful. Values:  | 
Example usage
The following example URL queries the calculate REST operation:
https://machine.domain.com/server/rest/services/SampleService/TopographicProductionServer/calculateExtent?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=jsonJSON Response syntax
The following is the syntax of a response:
{
  "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:
{
  "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
}