FRAMES | NO FRAMES Description | Parameters | Examples | Response
Areas and Lengths (Operation)
URL http://<geometryservice-url>/areasAndLengths
Parent Resource Geometry Service


The areasAndLengths operation is performed on a geometry service resource. This operation calculates areas and perimeter lengths for each polygon specified in the input array.

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

Parent Resource

Geometry Service


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

Values: html | json
polygons Description: The array of polygons whose areas and lengths are to be computed. The spatial reference of the polygons is specified by sr. The structure of each 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:



  "rings" : [
  "rings" : [

URL based:

For a large set of geometries, you can specify a URL to the input geometries stored in a JSON structure in a file on a public server.

Syntax: polygons={ "url" : "<URL to file>" }
Example: polygons={ "url" : "http://myserver/mygeometries/afile.txt" }

sr Description: The well-known ID of the spatial reference of the input polygons. For a list of valid WKID values, see Projected coordinate Systems and Geographic coordinate Systems.

Example Usage

Example 1: In this example, the areas and lengths of the two input polygons are calculated.

JSON Response Syntax

"areas" : [ <area1>, <area2> ], "lengths" : [ <length1>, <length2> ]

JSON Response Example

"areas" : [ 1.0, 0.167199999999997 ],
"lengths" : [ 6.82842712474619, 5.16125300726341 ]