User Tools

Site Tools


api:dk11:activex:tatukgis_xdk11.itgis_shape.distance2shape_2_itgis_shape_itgis_line

Table of Contents

ITGIS_Shape.Distance2Shape_2 method

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.

Available also on: Delphi | .NET | Java | Python.

Syntax

// 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;

Parameters

Name Type Description
_shp ITGIS_Shape Reference shape for distance calculation.
_line ITGIS_Line Output line segment connecting the nearest points on both shapes.

Result

Type Description
double
Double
Shortest distance in map units.

Remarks

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.

2026/07/05 01:25

Page Tools