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


IGeometryServer3.GetAreasAndLengthsGeodesic Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Geometry)  

IGeometryServer3.GetAreasAndLengthsGeodesic Method

Returns true geodesic area and geodesic perimeter length for each input polygon.

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

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. This method calculates the ellipsoidal shortest path distance between each pair of the vertices in the polylines.

The spatial reference can be a projected or a geographic coordinate system. If the former, then the geometries are first inverse projected into its associated geographic coordinate system and then the distance calculations are performed.

See Also

IGeometryServer3 Interface