User Tools

Site Tools


api:dk11:delphi:gislayervector.tgis_shape.addpointbearing_double_double

Table of Contents



TGIS_Shape.AddPointBearing(Double; Double) method

DK for Delphi | GisLayerVector.TGIS_Shape.AddPointBearing | Overloads | Constructors | Fields | Methods | Properties

Adds a point using a map-space bearing and distance measured from the last vertex.

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

Syntax

// Delphi
public
  function AddPointBearing(
    const _bearing : Double;
    const _distance : Double
  ) : Boolean; overload; virtual;
// C++ Builder
public:
  virtual bool AddPointBearing(
    const double _bearing,
    const double _distance
  ) /* overload */;

Parameters

Name Type Description
_bearing Double bearing in radians in map-space orientation
_distance Double distance from the last vertex in layer units

Result

Type Description
Boolean True if the point was added successfully; otherwise False.

Remarks

PURPOSE: Extends line or polygon geometry by computing the next vertex from directional and distance input.

BEHAVIOR: Calculates a new point from the last vertex using the supplied bearing and distance, then appends it to the current part.

CONSTRAINTS: Requires an existing last vertex from which the new point can be calculated.

If the _compass is True then the bearing will be calculated based on North. Otherwise the bearing is calculated as an angle between last vertex and new point. Shape must have at least one vertex (2 points) in a current part for non-compass computations and at least one point for compass computations. If point can not be added (because no vertex exist or an angle can not be calculated) then function return False.

2026/07/11 00:38

Page Tools