Calculates areas and perimeter lengths for each polygon in the specified array. Optionally does unit conversion.
[Visual Basic .NET] Public Sub GetAreasAndLengths2 ( _ ByVal pSR As ISpatialReference, _ ByVal pInPolygons As IPolygonArray, _ ByVal pLengthUnit As ILinearUnit, _ ByVal pAreaUnit As ILinearUnit, _ ByVal areaUnitEnum As esriAreaUnits, _ ByRef ppAreas As IDoubleArray, _ ByRef ppLengths As IDoubleArray _ )
[C#] public void GetAreasAndLengths2 ( ISpatialReference pSR, IPolygonArray pInPolygons, ILinearUnit pLengthUnit, ILinearUnit pAreaUnit, esriAreaUnits areaUnitEnum, ref IDoubleArray ppAreas, ref IDoubleArray ppLengths );
[C++]
HRESULT GetAreasAndLengths2(
ISpatialReference* pSR,
IPolygonArray* pInPolygons,
ILinearUnit* pLengthUnit,
ILinearUnit* pAreaUnit,
esriAreaUnits areaUnitEnum,
IDoubleArray** ppAreas,
IDoubleArray** ppLengths
);
[C++]Parameters
pSRpSR is a parameter of type ISpatialReference
pInPolygonspInPolygons is a parameter of type IPolygonArray
pLengthUnitpLengthUnit is a parameter of type ILinearUnit
pAreaUnitpAreaUnit is a parameter of type ILinearUnit
areaUnitEnumareaUnitEnum is a parameter of type esriAreaUnits
ppAreas [out]ppAreas is a parameter of type IDoubleArray
ppLengths [out]ppLengths is a parameter of type IDoubleArray
Product Availability
Remarks
The area and length values are computed in the units specified as input parameters, if they are present, otherwise they are computed in the units of the spatial reference. It is not recommended that this method be used on geometries having latitude-longitude coordinates. You can use the GetLengthsGeodesic method to compute accurate lengths for polylines with latitude-longitude coordinates.