AutoCAD Map 3D 2009 Geospatial Platform Reference

AutoCAD Map 3D Geospatial Platform API

virtual double MgGeometry::Distance ( MgGeometry other,
MgMeasure measure 
) [virtual]

Returns the shortest distance between this geometry and another. By default distance computation is done using a linear algorithm unless a custom measure is supplied.

.NET Syntax
virtual double Distance(MgGeometry other, MgMeasure measure);
Java Syntax
virtual double Distance(MgGeometry other, MgMeasure measure);
PHP Syntax
virtual double Distance(MgGeometry other, MgMeasure measure);

Parameters:
other (MgGeometry) The MgGeometry to determine the distance to.
measure (MgMeasure) The MgMeasure instance to use when computing the distance. If null, a linear distance algorithm is used.
Returns:
A double value representing the shortest distance between two geometries.