ArcObjects Library Reference (Geometry)  

IGeometryServer3.GetAreasAndLengthsPreserveShape Method

Returns true area and perimeter length for each input polygon.

[Visual Basic .NET]
Public Sub GetAreasAndLengthsPreserveShape ( _
    ByVal pSR As ISpatialReference, _
    ByVal pPolygons 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 GetAreasAndLengthsPreserveShape (
    ISpatialReference pSR,
    IPolygonArray pPolygons,
    ILinearUnit pLengthUnit,
    ILinearUnit pAreaUnit,
    esriAreaUnits areaUnitEnum,
    ref IDoubleArray ppAreas,
    ref IDoubleArray ppLengths
);
[C++]
HRESULT GetAreasAndLengthsPreserveShape(
  ISpatialReference* pSR,
  IPolygonArray* pPolygons,
  ILinearUnit* pLengthUnit,
  ILinearUnit* pAreaUnit,
  esriAreaUnits areaUnitEnum,
  IDoubleArray** ppAreas,
  IDoubleArray** ppLengths
);
[C++]

Parameters

pSR

  pSR is a parameter of type ISpatialReference

pPolygons

  pPolygons is a parameter of type IPolygonArray

pLengthUnit

  pLengthUnit is a parameter of type ILinearUnit

pAreaUnit

  pAreaUnit is a parameter of type ILinearUnit

areaUnitEnum

  areaUnitEnum 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

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

Remarks

The method calculates the area or length of the geometry on the surface of the Earth ellipsoid, for geometry defined in projected or geographic coordinate system. This method preserves the shape of the geometry in its coordinate system. This means the true area or length will be calculated for the geometry you see in the map. (What you see is what you get.)

The returned lengths and areas are expressed in the specified linear units and area 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.

See Also

IGeometryServer3 Interface