- URL:
- https://<root>/Utilities/Geometry/GeometryServer/areasAndLengths
- Methods:
GET
- Version Introduced:
- 9.3
Description
The areas
operation is performed on a geometry service resource. This operation calculates areas and perimeter lengths for each polygon specified in the input array. The input polygon is simplified when the calculation
is not planar
. You can provide arguments to the areas
operation as query parameters defined in the following parameters table.
Request parameters
Parameter | Details |
---|---|
| Specifies the array of polygons whose areas and lengths are to be computed. The spatial reference of the polygons is specified by JSON structures: Syntax:
Example:
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. The expected format of the file's contents will be the same as that expected if the polygons were directly embedded in the request. URL-based syntax
URL-based example
|
| Specifies the well-known ID (WKID) of the spatial reference or a spatial reference JSON object for the input |
| Specifies the length unit used to calculate the perimeters of the polygons. If |
| Specifies the area unit used to calculate the areas of the polygons. If Additional Values for Syntax If one of the additional values for the area unit is used, put it in JSON format.
Examples
|
| Specifies the type defined for the area and length calculation of the input geometries. The type can be one of the following values:
|
| The response format. The default response format is Values: |
Example usage
The following is a decoded sample request URL (the actual URL must be encoded) for areas
demonstrating how the areas and lengths of two polygons are calculated. The lengths are returned in miles, and the areas are returned in acres.
JSON Response syntax
{
"areas": [ <area1>, <area2>, ..., <areaN> ],
"lengths": [ <length1>, <length2>, ..., <lengthN> ]
}
JSON Response example
{
"areas": [
2150.340979272913,
2800449.740201426
],
"lengths": [
222.93213167603818,
264.5927746444603
]
}