- URL:https://<topographicProductionServer-url>/calculateExtent
- Related Resources:Generate Product
- Version Introduced:10.9.1
Description
License:
The use of this resource requires an ArcGIS GIS Server Advanced license and a Production Mapping or Defense Mapping server extension license.
The calculateExtent operation calculates a custom area of interest (AOI) for a given product and version. The result can be specified as the value for the customAoi parameter of the generateProduct operation.
Request parameters
Parameter | Details |
---|---|
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
Property | Details |
---|---|
success | Indicates if the operation was successful. Values: true | false |
Example usage
The following example URL queries the calculateExtent 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=json
JSON 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
}