This document is archived and information here might be outdated.  Recommended version.


IGeometryServer.GetAreasAndLengths Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Geometry)  

IGeometryServer.GetAreasAndLengths Method

Calculates areas and perimeter lengths for each polygon in the specified array.

[Visual Basic .NET]
Public Sub GetAreasAndLengths ( _
    ByVal pSR As ISpatialReference, _
    ByVal pInPolygons As IPolygonArray, _
    ByRef ppAreas As IDoubleArray, _
    ByRef ppLengths As IDoubleArray _
)
[C#]
public void GetAreasAndLengths (
    ISpatialReference pSR,
    IPolygonArray pInPolygons,
    ref IDoubleArray ppAreas,
    ref IDoubleArray ppLengths
);
[C++]
HRESULT GetAreasAndLengths(
  ISpatialReference* pSR,
  IPolygonArray* pInPolygons,
  IDoubleArray** ppAreas,
  IDoubleArray** ppLengths
);
[C++]

Parameters pSR
pSR is a parameter of type ISpatialReference pInPolygons
pInPolygons is a parameter of type IPolygonArray ppAreas [out]
ppAreas is a parameter of type IDoubleArray ppLengths [out]
ppLengths is a parameter of type IDoubleArray

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

All geometries are assumed to be defined in the spatial reference pSR, which cannot be nil. The area and length values are computed in that spatial reference. It is not recommended that this method be used on geometries associated with a geographic coordinate system, since the length would then be calculated in units of "degrees" and the area would be calculated in units of "square degrees".

Refer to IGeometryServer for additional details on how the input spatial reference is interpreted.

See Also

IGeometryServer Interface