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.
// 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;
| Name | Type | Description |
|---|---|---|
| _shp | ITGIS_Shape | Reference shape to measure distance to. |
| Type | Description |
|---|---|
| double Double | Distance in meters, or -1 if the coordinate system is undefined or transformation fails. |
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.