User Tools

Site Tools


api:dk11:activex:tatukgis_xdk11.itgis_shape.distance2shapecs_itgis_shape

Table of Contents

ITGIS_Shape.Distance2ShapeCS method

DK for ActiveX | TatukGIS_XDK11.ITGIS_Shape.Distance2ShapeCS | Methods | Properties

Calculates geodetic distance between two shapes using the WGS84 (World Geodetic System 1984, EPSG:4326) model.

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

Syntax

// C#
public double Distance2ShapeCS(
  ITGIS_Shape _shp
);
' VisualBasic
Public Function Distance2ShapeCS(
  ByVal _shp As ITGIS_Shape
) As Double
// Oxygene
public
  function Distance2ShapeCS(
    _shp : ITGIS_Shape
  ) : Double;

Parameters

Name Type Description
_shp ITGIS_Shape Reference shape to measure distance to.

Result

Type Description
double
Double
Distance in meters, or -1 if the coordinate system is undefined or transformation fails.

Remarks

PURPOSE: Measure real-world distance between two vector geometries while accounting for CRS (Coordinate Reference System) context and Earth curvature.

BEHAVIOR: Evaluates the shortest distance in geodetic space and returns the result in meters. Coordinate transformation may be required when the shapes use different spatial references.

CONSTRAINTS: Requires valid coordinate system information. This method is slower than Distance2Shape because CRS handling is applied.

2026/07/05 01:25

Page Tools