Calculates area and perimeter length for each polygon in the input array.
GetAreasAndLengths(SpatialReference SpatialReference, Polygon[] InPolygonArray, out double[] Lengths)
Parameter |
Description |
SpatialReference |
The spatial reference of the geometries in the InPolygonArray parameter. Cannot be null. |
InPolygonArray |
The array of Polygons on which area and boundary length will be calculated (on each Polygon). All geometries are assumed to be in the coordinate system defined by the input spatial reference. |
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
An array of double values (double[]) containing the area for each Polygon in the input array.
Remarks
The area and length values are computed in the units of the input spatial reference. It is not recommended that this method be used on geometries having latitude-longitude coordinates, since the length would then be calculated in units of "degrees" and the area would be calculated in units of "square degrees". You can use the GetLengthsGeodesic method to compute accurate lengths for polylines with latitude-longitude coordinates.
Examples