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


IGeometryServer2.GetDistanceGeodesic Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Geometry)  

IGeometryServer2.GetDistanceGeodesic Method

Reports the shortest geodesic distance between G1 and G2.

[Visual Basic .NET]
Public Function GetDistanceGeodesic ( _
    ByVal pSR As ISpatialReference, _
    ByVal pG1 As IGeometry, _
    ByVal pG2 As IGeometry, _
    ByVal pDistanceUnit As ILinearUnit _
) As Double
[C#]
public double GetDistanceGeodesic (
    ISpatialReference pSR,
    IGeometry pG1,
    IGeometry pG2,
    ILinearUnit pDistanceUnit
);
[C++]
HRESULT GetDistanceGeodesic(
  ISpatialReference* pSR,
  IGeometry* pG1,
  IGeometry* pG2,
  ILinearUnit* pDistanceUnit,
  double* pDistanceGeodesic
);
[C++]

Parameters pSR
pSR is a parameter of type ISpatialReference pG1
pG1 is a parameter of type IGeometry pG2
pG2 is a parameter of type IGeometry pDistanceUnit
pDistanceUnit is a parameter of type ILinearUnit pDistanceGeodesic [out, retval] pDistanceGeodesic is a parameter of type double

Product Availability

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

Remarks

The distance value is computed in the specified linear units, if present, or in the units of the spatial reference. If SpatialReference is a projected coordinate system, the input geometries will first be inverse projected and then shortest geodesic distance will be computed on the latitude-longitude coordinates.

See Also

IGeometryServer2 Interface