This document is archived and information here might be outdated. Recommended version. |
Returns the minimal distance between two geometries.
[Visual Basic .NET] Public Function ReturnDistance3D ( _ ByVal pOther As IGeometry _ ) As Double
[C#] public double ReturnDistance3D ( IGeometry pOther );
[C++]
HRESULT ReturnDistance3D(
IGeometry* pOther
);
[C++]
Parameters pOther
pOther is a parameter of type IGeometry*
Returns the minimum distance between two z aware geometries in 3D space. If the geometries intersect, the minimum distance is 0. Only returns the distance, and not the nearest points.
public static void ReturnDistance3D()
{
IGeometry pointGeometry=GetPointGeometry();
IGeometry envelopeGeometry=GetEnvelopeGeometry();
IProximityOperator3D proximityOperator3D=envelopeGeometry as IProximityOperator3D;
double distance3D=proximityOperator3D.ReturnDistance3D(pointGeometry);
//distance3D = 13.971
}