User Tools

Site Tools


api:dk11:activex:tatukgis_xdk11.itgis_shape.getsnappoint_itgis_point_double_double

Table of Contents

ITGIS_Shape.GetSnapPoint method

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

Find the nearest snap point on the shape geometry to a target location.

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

Syntax

// C#
public ITGIS_Point GetSnapPoint(
  ITGIS_Point _ptg,
  double _prec,
  ref double _dist
);
' VisualBasic
Public Function GetSnapPoint(
  ByVal _ptg As ITGIS_Point,
  ByVal _prec As Double,
  ByRef _dist As Double
) As ITGIS_Point
// Oxygene
public
  function GetSnapPoint(
    _ptg : ITGIS_Point;
    _prec : Double;
    var _dist : Double
  ) : ITGIS_Point;

Parameters

Name Type Description
_ptg ITGIS_Point Target point to snap to the shape.
_prec double
Double
Search radius in map units.
_dist double
Double
Outputs the distance from _ptg to the returned snap point.

Result

Type Description
ITGIS_Point Nearest snap point on the shape, including a vertex or projected point on a segment. Returns _ptg unchanged if no snap point is found within the search radius.

Remarks

PURPOSE: Supports interactive vector editing by locating a precise snap position on existing shape geometry.

BEHAVIOR: Searches vertices and edge locations within the specified tolerance and returns the closest valid snap point. The method also updates _dist with the achieved snap distance.

USAGE: Use this method in editing tools for snap-to-vertex and snap-to-edge behavior while digitizing or reshaping geometry.

CONSTRAINTS: If no candidate is found within _prec, the original point is returned. Virtual method.

2026/07/05 01:25

Page Tools