DK for Delphi | GisTopology.TGIS_Topology | Classes | Constructors | Methods | Properties | Events
Topology engine for DE-9IM (Dimensionally Extended 9-Intersection Model) spatial relationship testing, constructive geometry operations, shape repair, splitting, and tolerance-based processing on GIS shapes.
// Delphi type TGIS_Topology = class( TGIS_ObjectDisposable ) end;
// C++ Builder class PASCALIMPLEMENTATION TGIS_Topology : public TGIS_ObjectDisposable { };
| Name | Visibility | Description | |
|---|---|---|---|
| Create | public | Creates a topology engine instance for DE-9IM (Dimensionally Extended nine-Intersection Model) tests and constructive geometry operations on vector shapes. | |
| Name | Visibility | Description | |
|---|---|---|---|
| ArcFind | public | Finds an arc with duplicated geometry on the specified list. | |
| ArcMakeConnected | public | Connects the specified unconnected arc to the best matching arc from the given list. | |
| ArcSplitOnCross | public | Returns a copy of the arc divided at crossing points with shapes from the list. | |
| CheckShape | public | Checks whether a shape is topologically valid. | |
| ClearShape(TGIS_Shape) | public | Creates a copy of the shape with redundant overlapped points removed. | |
| ClearShape(TGIS_Shape; Boolean) | public | Creates a copy of the shape with redundant overlapped points removed. | |
| Combine(TGIS_Shape; TGIS_Shape; TGIS_TopologyCombineType) | public | Computes a new shape from two input shapes using the specified topology combine operation. | |
| Combine(TGIS_Shape; TGIS_Shape; TGIS_TopologyCombineType; Boolean) | public | Computes a new shape from two input shapes using the specified topology combine operation. | |
| ConcaveHull(TGIS_LayerVector; Double) | public | Creates a concave hull polygon for all shapes in the provided vector layer using the specified maximum edge length. | |
| ConcaveHull(TGIS_Shape; Double) | public | Creates a concave hull polygon for the provided shape using the specified maximum edge length. | |
| ConcaveHull(TGIS_Shape; TGIS_Shape; Double) | public | Creates a concave hull polygon for one shape or for the combined vertices of two shapes using the specified maximum edge length. | |
| ConcaveHull(TGIS_Shape; TGIS_Shape; Double; Boolean) | public | Creates a concave hull polygon for one shape or for the combined vertices of two shapes using the specified maximum edge length. | |
| Contains | public | Tests whether the first shape contains the second shape according to the DE-9IM (Dimensionally Extended 9-Intersection Model) relation. | |
| ConvexHull(TGIS_LayerVector) | public | Creates a convex hull polygon for all shapes in the provided vector layer. | |
| ConvexHull(TGIS_Shape) | public | Computes the convex hull, which is the minimal convex polygon enclosing all vertices of the input shape. | |
| ConvexHull(TGIS_Shape; TGIS_Shape) | public | Computes the convex hull polygon for one shape or for the combined vertices of two shapes. | |
| ConvexHull(TGIS_Shape; TGIS_Shape; Boolean) | public | Computes the convex hull polygon for one shape or for the combined vertices of two shapes. | |
| Cross | public | Tests whether two shapes cross according to the DE-9IM (Dimensionally Extended 9-Intersection Model) topology relation. | |
| Difference(TGIS_Shape; TGIS_Shape) | public | Computes the geometric difference (A minus B), returning portions of shape A not overlapping with shape B. | |
| Difference(TGIS_Shape; TGIS_Shape; Boolean) | public | Computes a new shape as the difference of two input shapes. | |
| Disjoint | public | Tests whether two shapes are disjoint according to the DE-9IM (Dimensionally Extended 9-Intersection Model) relation. | |
| Equality | public | Tests whether two shapes are topologically equal according to the DE-9IM (Dimensionally Extended 9-Intersection Model) relation. | |
| FindAndDeleteLoops(TGIS_Shape) | public | Deletes loops smaller than the current tolerance. | |
| FindAndDeleteLoops(TGIS_Shape; Boolean) | public | Deletes loops smaller than the current tolerance. | |
| FindSameOnList | public | Checks whether the given shape has an exactly matching counterpart on the specified list. | |
| FixShape(TGIS_Shape) | public | Computes a shape without self-crossings for arcs and polygons and enforces proper polygon winding. | |
| FixShape(TGIS_Shape; Boolean) | public | Computes a shape without self-crossings for arcs and polygons and enforces proper polygon winding. | |
| FixShapeEx(TGIS_Shape; Boolean; Boolean) | public | Computes a shape without self-crossings for arcs and polygons and enforces proper polygon winding. | |
| FixShapeEx(TGIS_Shape; Boolean; Boolean; Boolean) | public | Computes a shape without self-crossings for arcs and polygons and enforces proper polygon winding. | |
| GetCrossings | public | Gets all crossing points between two shapes. | |
| GetCrossings3D | public | Gets all 3D crossing points between two shapes. | |
| Intersect | public | Tests whether two shapes intersect according to the DE-9IM (Dimensionally Extended 9-Intersection Model) topology relation. | |
| Intersection(TGIS_Shape; TGIS_Shape) | public | Computes the spatial intersection (overlay) of two shapes, returning only the geometry common to both. | |
| Intersection(TGIS_Shape; TGIS_Shape; Boolean) | public | Computes a new shape as the intersection of two input shapes. | |
| MakeBuffer(TGIS_Shape; Double) | public | Computes a buffer polygon around a shape at the specified distance using 9 vertices to approximate quarter-circle arcs. | |
| MakeBuffer(TGIS_Shape; Double; Integer; Boolean) | public | Computes a buffer around a shape at the specified distance. | |
| MakeOffsetLine(TGIS_Shape; Double) | public | Computes an offset line for a shape at the specified distance. | |
| MakeOffsetLine(TGIS_Shape; Double; TGIS_JoinType) | public | Computes an offset line for a shape at the specified distance. | |
| Overlap | public | Tests whether two shapes overlap according to the DE-9IM (Dimensionally Extended 9-Intersection Model) topology relation. | |
| PartStatus | public | Verifies whether the specified polygon part is a main part, hole, or island. | |
| Relate | public | Tests whether two geometries satisfy a topological relationship defined by a DE-9IM (Dimensionally Extended 9-Intersection Model) pattern. | |
| RelatePrepare | public | Marks the given shape as the prepared shape for subsequent Relate operations. | |
| SplitByArc(TGIS_Shape; TGIS_ShapeArc) | public | Divides an input shape (polygon, arc, or multipoint) into multiple shapes along a given arc. | |
| SplitByArc(TGIS_Shape; TGIS_ShapeArc; Boolean) | public | Divides an input shape (polygon, arc, or multipoint) into multiple shapes along a given arc, or returns a copy when the arc does not split it. | |
| SymmetricalDifference(TGIS_Shape; TGIS_Shape) | public | Computes the symmetric difference of two shapes (parts of either A or B, but not both; XOR operator). | |
| SymmetricalDifference(TGIS_Shape; TGIS_Shape; Boolean) | public | Computes the symmetric difference of two shapes (parts of either A or B, but not both; XOR operator), with optional topology repair. | |
| Touch | public | Tests whether two shapes touch according to the DE-9IM (Dimensionally Extended 9-Intersection Model) relation. | |
| Union(TGIS_Shape; TGIS_Shape) | public | Computes a new shape as the union of two input shapes. | |
| Union(TGIS_Shape; TGIS_Shape; Boolean) | public | Computes a new shape as the union of two input shapes. | |
| UnionOnList(TGIS_ShapeList) | public | Computes the union of all shapes in the list. | |
| UnionOnList(TGIS_ShapeList; Boolean) | public | Computes the union of all shapes in the list. | |
| Within | public | Tests whether the first shape is within the second shape according to the DE-9IM (Dimensionally Extended 9-Intersection Model) relation. | |
| Name | Visibility | Description | |
|---|---|---|---|
| ForceShapeFixing | public | If True, topological operations force shape fixing before processing. | |
| Tolerance | public | Tolerance used by topology operations. | |
| Name | Visibility | Description | |
|---|---|---|---|
| BusyEvent | published | Fired regularly during long-running topology operations to report busy state or progress. | |
PURPOSE: Provides core topology processing for TatukGIS shapes, including spatial predicate evaluation, geometry combination, shape validation and fixing, loop cleanup, and arc/polygon split workflows. It is used in Geographic Information System (GIS) applications that need robust vector overlay analysis and geometry cleanup.
BEHAVIOR: Operations are tolerance-based and work with point, arc, polygon, and multipoint geometries. The class evaluates DE-9IM intersection matrix patterns, performs union/intersection/difference- style combine operations, can cache a prepared shape for repeated relate tests, and can optionally fix invalid geometry before selected operations. Shape fixing handles self-crossings, loop removal, and polygon winding or hole orientation correction.
USAGE: Use the topology engine to test relationships or produce derived geometry from existing shapes.
topology = TGIS_Topology() if topology.Relate(shape1, shape2, RELATE_TOUCH) result = topology.Intersection(shape1, shape2)
CONSTRAINTS: Behavior for invalid input and result availability is implementation-specific. Prepared-shape caching is stateful and should be cleared when no longer needed. Long-running operations may report progress through the busy event.
TatukGIS supports a powerful, yet easy to manage, mechanism for querying against spatial relationships between two shapes. This mechanism is known as the Dimensionally Extended 9 Intersection Model (DE-9IM).
The idea is to manage a 9 element mechanism in which each element defines the relationship possibilities between the interiors, exteriors, and boundaries of two shapes. The relationship is defined in terms of intersection types, or lack of an intersection.
The nature of the shape intersections is defined by a set of interior, boundary and exterior relationship possibilities, forming a 3×3 table. The table can be represented by a string (row-by-row) '*'. Each element of the table represents an intersection possibility:
T - Intersection exists
F - Intersection does not exist
* - Does not matter
0 - Intersection is a point (dimension = 0)
1 - Intersection is a line(dimension = 1)
2 - Intersection is a polygon (dimension = 2)
1. Equality
A & B Interiors intersect and no interior or boundary of one shape intersects with the exterior or boundary other shape. String representation is:
T*F**FFF
Predefined constant: RELATE_EQUALITY
2. Disjoint
There is no intersection of any kind. String representation is:
FF*FF****
Predefined constant: RELATE_DISJOINT
3. Intersect
By interiors. String representation is:
T********
Predefined constant: RELATE_INTERSECT
Interior of A intersects the boundary of B String representation is:
*T*******
Predefined constant: RELATE_INTERSECT1
Boundary of A intersects the Interior of B String representation is:
***T*****
Predefined constant: RELATE_INTERSECT2
Boundary of A intersects the Boundary of B String representation is:
****T****
Predefine constant: RELATE_INTERSECT3
4. Touch
Boundary of A intersects with interior of B. String representation is:
F**T*****
Predefined constant: RELATE_TOUCH_INTERIOR
Boundary of A intersects boundary of B (but not the interior of B) String representation is:
F***T***
Predefined constant: RELATE_TOUCH
5. Overlap
A overlaps B (and B overlaps A) if both the interiors and exteriors intersect. General formula (except line-to-line situations). String representation is:
T*T***T**
Predefined constant: RELATE_OVERLAP
A overlaps B (and B overlap A) if the interior intersection has a dimension equal to 1 (is a line) and the exteriors intersect. Only for line-to-line relationships. String representation is:
1*T***T**
Predefined constant: RELATE_OVERLAP_LINE
6. Cross
A crosses B if the interiors intersect and the exterior of B intersects with the interior of A. General formula (except line-to-line situations). String representation is:
T*T******
Predefined constant: RELATE_CROSS
A crosses B (and B crosses A) if the dimension of the intersection equals 0 (is a point). Only for line-to-line relationships. String representation is:
0********
Predefined constant: RELATE_CROSS_LINE
7. Within
A is within B if the interiors intersect and the exterior of B is not intersected by the Interior or boundary of A. String representation is:
T*F**F***
Predefined constant: RELATE_WITHIN
8. Contains
A contains B if the interiors intersect and the exterior of A is not intersected by the Interior or boundary of B. String representation is:
T*****FF*
Predefined constant: RELATE_CONTAINS