DK for ActiveX | TatukGIS_XDK11.ITGIS_Shape.Distance2Shape_2 | Methods | Properties
Calculates the minimum planar distance between two shapes and returns the shortest connecting line segment.
// C# public double Distance2Shape_2( ITGIS_Shape _shp, ref ITGIS_Line _line );
' VisualBasic Public Function Distance2Shape_2( ByVal _shp As ITGIS_Shape, ByRef _line As ITGIS_Line ) As Double
// Oxygene public function Distance2Shape_2( _shp : ITGIS_Shape; var _line : ITGIS_Line ) : Double;
| Name | Type | Description |
|---|---|---|
| _shp | ITGIS_Shape | Reference shape for distance calculation. |
| _line | ITGIS_Line | Output line segment connecting the nearest points on both shapes. |
| Type | Description |
|---|---|
| double Double | Shortest distance in map units. |
PURPOSE: Measure planar distance between two geometries and retrieve the corresponding nearest-point connector for visualization or analysis.
BEHAVIOR: Computes the shortest Euclidean distance and updates _line so that its endpoints represent the nearest points on the two shapes.
CONSTRAINTS: This method is planar only. The _line parameter is modified by the call.