User Tools

Site Tools


api:dk11:delphi:gistopology.tgis_topology.combine_tgis_shape_tgis_shape_tgis_topologycombinetype_boolean

TGIS_Topology.Combine(TGIS_Shape; TGIS_Shape; TGIS_TopologyCombineType; Boolean) method

DK11 for Delphi | GisTopology.TGIS_Topology.Combine | Overloads | Constructors | Methods | Properties | Events

Compute a new shape from the two shapes provided, based on a given operation.

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

Syntax

// Delphi
public
  function Combine(
    const _shpA : TGIS_Shape;
    const _shpB : TGIS_Shape;
    const _operation : TGIS_TopologyCombineType;
    const _fixshape : Boolean
  ) : TGIS_Shape; overload;
// C++ Builder
public:
  TGIS_Shape* Combine(
    TGIS_Shape* const _shpA,
    TGIS_Shape* const _shpB,
    TGIS_TopologyCombineType* const _operation,
    const bool _fixshape
  ) /* overload */;

Parameters

Name Type Description
_shpA TGIS_Shape first shape
_shpB TGIS_Shape second shape
_operation TGIS_TopologyCombineType operation code; what kind of operation should be perform between (_shpA) and (_shpB)
_fixshape Boolean if True, then checks and eventually fixes the input shapes for common topological problems, like self-crossings, overlapped parts etc.

Result

Type Description
TGIS_Shape returns new shape combined out of two others based on given type of operation

Remarks

See TGIS_Shape.Combine for example.

Tip for Intersection operation

When using with many shapes e.g. in loop, check input shapes extents before to improve performance.

// pseudocode:
if GisIsCommonExtent(_shpA, _shpB)
  out = TGIS_Topology.Combine(_shpA, _shpB, TGIS_TopologyCombineType.Intersection) ;

References

2023/03/24 01:21

Page Tools