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.
// 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 */;
| 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.). |
| Type | Description |
|---|---|
| TGIS_Shape | Newly created result shape (always new object). |
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.