Geometry service GetAreasAndLengthsGeodesic method

The GetAreasAndLengthsGeodesic method calculates geodesic area and perimeter for each input polygon.

GetAreasAndLengthsGeodesic (SpatialReference SpatialReference, Polygon[] InPolygonArray, LinearUnit LengthUnit, LinearUnit AreaUnit, out double[] Lengths)

Parameter

Description

SpatialReference

SpatialReference of the geometries in InPolygonArray. Cannot be null.

InPolygonArray

The array of polygons for which area and boundary length will be calculated. All geometries are assumed to be in the coordinate system defined by SpatialReference.

LengthUnit

Output lengths are expressed in this unit of measure (optional).

AreaUnit

Output areas are expressed in this (squared) unit of measure (optional).

Lengths

A double[] containing the boundary length (perimeter) for each polygon in the input array. The variable is populated when the method is called.

Return Value

A double[] containing the area for each polygon in the input array.

Remarks

Use this method if you want to calculate an area or length using only the vertices of the polygon and define the lines between the points as geodesic segments independent of the actual shape of the polygon. A geodesic segment is the shortest path between two points on an ellipsoid.

The returned areas and lengths are expressed in the specified area units and linear units, if present, or in the units of the spatial reference. If AreaUnit and LengthUnit are not specified and the input spatial reference is a geographic coordinate system, then the lengths and areas are expressed in meters.

The spatial reference can be a projected or a geographic coordinate system. If the former, then each geometry is inverse projected into its associated geographic coordinate system before the distance calculations are performed.

11/8/2016