TopologyTutorial sample
Summary
A step-by-step introduction to the low-level Topology Layer API
Description
What the sample shows (each numbered button is one step):
[0]
obtaining TGIS_TopoEditUtils from the viewer editor and choosing the topology edit mode (Autocommit / Transaction)
[1]
creating an empty topology in the selected storage (SQLite / PostGIS / Oracle) and opening its project
[2]
adding isolated nodes
[3]
adding edges between nodes - closing a ring creates a face
[4]
adding a node on an existing edge - the edge is split (compare SplitMergeMode = false / true)
[5]
moving a node - connected edges follow it
[6]
adding a dangling edge (connected at one end only)
[7]
adding an edge across a face - the face is split in two
[8]
adding a closed edge inside a face - an inner face (hole) appears
[9]
changing edge geometry - adjacent faces are updated
[10]
deleting a node - the two edges it joined are merged
[11]
deleting an edge - the two faces it separated are merged
[12]
adding more primitives to have data for feature layers
[13-16]
building polygon feature layers POLY0..POLY3 (levels 0..3)
[17]
building line feature layers LINE0..LINE3
[18]
building point feature layers POINT0..POINT3
Every step writes a short description of its result to the log box; node/edge/face IDs are drawn as
labels so the changes can be followed directly on the map.
This sample illustrates use of:
| Name | Description |
| TGIS_TopoTool | Main topology editing and management tool for viewer-based GIS applications. |
| TGIS_TopoEditUtils | Helper class for topology geometry and feature editing against topology-aware layers and topology stores. |
| TGIS_TopoStoreAbstract | Abstract topology store for managing topology schema metadata, primitive topology elements, composite topology features, and persistent topology storage. |
Code
This sample is available on the following platforms (click to view the source code on GitHub):