User Tools

Site Tools


api:dk11:delphi:gislayervector.tgis_shape.combine_tgis_shape_tgis_topologycombinetype

Table of Contents



TGIS_Shape.Combine(TGIS_Shape; TGIS_TopologyCombineType) method

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

Performs boolean geometry operation (union/intersection/difference) combining this shape with another. Generic operation dispatcher.

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

Syntax

// Delphi
public
  function Combine(
    const _shape : TGIS_Shape;
    const _operation : TGIS_TopologyCombineType
  ) : TGIS_Shape; overload;
// C++ Builder
public:
  TGIS_Shape* Combine(
    TGIS_Shape* const _shape,
    TGIS_TopologyCombineType* const _operation
  ) /* overload */;

Parameters

Name Type Description
_shape TGIS_Shape Shape to combine with. Must have valid geometry.
_operation TGIS_TopologyCombineType Operation type (TGIS_TopologyCombineType: Union, Intersection, Difference, SymmetricalDifference, etc.).

Result

Type Description
TGIS_Shape Newly created result shape (always new object).

Remarks

PURPOSE:Generic dispatcher for all boolean geometry operations. Allows operation selection at runtime via enum. Core method; use Union/Intersection/Difference for clarity.

BEHAVIOR:Executes topology operation per _operation enum. Always returns newly created shape (original unchanged). Uses TGIS_Topology class internally. Result geometry validated topologically.

USAGE:Dynamic operation:op := GetOperationFromUser; result := shape1.Combine(shape2, op); { op: Union, Intersection, etc. }Explicit operation better:result := shape1. Union(shape2);

CONSTRAINTS:Always creates new shape (see Combine with _returnnewobj for in-place option). Operation must be valid enum value. Result ownership transferred to caller (must Free). Both shapes must have valid geometry.

2026/06/12 22:43

Page Tools