Blogs Topology Layer in TatukGIS - Draw Once, Stay Consistent Forever Neighboring polygons that should share a border often end up with small gaps or overlaps between them. The Topology Layer in TatukGIS Developer Kernel prevents this by storing each shared boundary once and building every feature from it. Your line and polygon data stays consistent automatically, whether you work through a few menu wizards in TatukGIS Editor or a few lines of code in your own DK-based application. Topology is the most significant addition to the Developer Kernel in years. Most releases add functions, formats, or controls. Topology adds a new data model, with its own storage, editing engine, validation rules, and hierarchy system, all of which work the same way in both the TatukGIS DK and the TatukGIS Editor. At a glance Released in DK v115.0 "Gordian Knot" (July 2026) and improved in every release since. Available in the DK for Delphi and DK for .NET editions and TatukGIS Editor 5. SQLite topology requires no TatukGIS Enterprise license. PostGIS Topology and Oracle Topology require an Enterprise license. The DK includes the TopologyLayer sample application, which presents the complete workflow. A full step-by-step guide is available in the Topology Layer documentation. The problem topology solves In a typical GIS dataset, every polygon stores its own boundary. When two neighboring parcels share a border, that information is stored twice, once in each polygon. Edit one polygon and the boundaries no longer match. The result is either a gap, a thin strip belonging to neither polygon, or an overlap, an area claimed by both polygons. Line data suffers in the same way: a vector line segment representing a road or gas pipe stops a few centimeters short of a junction, resulting in corrupted network calculations. Such errors are easily introduced, difficult to detect, and costly to fix, particularly when multiple persons edit the same dataset. Errors distort area calculations, tax records, network analysis, etc., and compound with each additional edit. Figure 1. A gap: an area between two polygons that belongs to neither. Each polygon stores its own copy of the boundary and editing has pulled the copies apart. Figure 2. An overlap: an area that belongs to both polygons. Each polygon stores its own copy of the boundary, and editing has pushed the copies into each other. What topology is Topology is a data model that stores geometry plus the relationships between geometries. A shared boundary is stored only once, and every object touching it refers to that single copy. Edit the boundary and all polygons along it change together, as do all line segments meeting at a shared junction. A gap or overlap is impossible because there is only one line. In TatukGIS, all topology is built from three primitives: Nodes are points: line endpoints, junctions, and connection points. Two Nodes can never exist at the same location. Edges are lines running from one Node to another. An Edge can bend through any number of internal vertices, but its two ends always belong to Nodes. Faces are areas enclosed by Edges. You never draw a Face. TatukGIS creates a Face from Edges forming a closed boundary. Figure 3. Face A and Face B share one Edge whose ends are Nodes. The boundary exists once, so it cannot be duplicated and the polygons cannot drift apart. When you create a topology, you choose its type. Polygon topology is meant for area data such as cadastre, administrative units, and land use. It is the only topology type that builds Faces. Line topology maintains Nodes and Edges for linear data. Network Data imports an existing network in its current structure. Read more in the guide: Understanding Topology, Working with Topology Primitives Feature Layers: meaning on top of geometry Primitives describe shape. Feature Layers describe meaning. A Feature Layer turns primitives into business objects such as parcels, districts, or road segments without copying any geometry. Each Feature only refers to the primitives it is made of. The first level, the base Feature Layer, is built directly on the Nodes, Edges, or Faces, and each base Feature corresponds to one of them. Feature Layers can then be stacked: parcels form districts, districts form counties, counties form regions. The example in the guide has 4 polygons on the base level, 2 multipolygons on the next level, and 1 multipolygon at the top. TatukGIS does not limit the number of levels. Figure 4. Four parcels are grouped into two districts and the districts are grouped into one county. Each level refers only to the level below, so all the data rests on a single set of Nodes, Edges, and Faces. Because higher levels are derived rather than stored, changes flow upward automatically. Delete one parcel at the bottom level and the district that contained it shrinks immediately, with every level above recalculated. To move a parcel to another district, remove it with Delete Feature Element and add it to the new district with Add Element(s) to Feature. The underlying geometry is not touched. Read more in the guide: Feature Layers, Building Feature Hierarchies, Hierarchical Topology Operation, Modifying Existing Features Where it is used Topology pays off wherever data must fit together without gaps or stay connected: Land parcels and cadastre: ownership, taxation, land registry. Administrative boundaries: municipalities, counties, states. Utility networks: water, gas, electricity grids, telecommunications. Transport networks: roads, railways, navigation. Environmental data: land use, forestry, protected areas, zoning. Spatial analysis: area calculations, overlays, routing, network analysis. Line topology for utility networks Water and gas networks, electricity grids, and telecom networks use Line topology, which maintains Nodes and Edges without building Faces. The same rules apply: Connected by design. Every pipe or cable segment is an Edge that starts and ends on a Node. An end point placed within the topology's tolerance of a Node snaps to it instead of stopping just short. New connections split the line. With "Automatically create missing nodes when adding an edge" setting switched on, a service line drawn onto a main line creates the junction Node and splits the main into two Edges. Junctions move as one. Move a valve or junction Node and every connected segment follows. Networks as features. Base Features built on Edges are polylines. Higher levels group polylines into multipolylines: pipe segments into mains or cable segments into feeders, and those into a whole network. Existing data. Network Data imports an existing network in its current structure. Figure 5. Moving a junction Node: every segment attached to the Node follows, so the network never breaks apart. Read more in the guide: Working with Topology Primitives, Creating a New Topology Editing in practice Drawing is simpler, not harder In a traditional GIS you draw a polygon. In a topology, you draw Nodes and Edges with the usual editing tools and the polygon appears on its own. The engine also handles the tedious parts. With Automatically create missing nodes when adding an edge switched on in Topology Settings, you can draw an Edge straight across existing lines. TatukGIS adds the missing end Nodes, inserts a Node wherever the new Edge crosses an existing one, splits the crossed Edges, and updates the Faces. A single stroke can divide one land parcel into several, all with correct shared boundaries. The result is identical to building every Node by hand. Bad edits are stopped immediately Every change is topologically validated as you make it. An invalid edit never reaches the dataset. For example: Unless automatic node creation is switched on, an Edge that does not start and end on a Node is not created. Dragging a Node so that one Edge would cross another is refused with a message such as "Edge 6 interior intersects edge 14". Dragging the end of an Edge gives the message "Edge endpoints cannot be moved. Move the node instead." One move updates everything Move a Node where four polygons meet and all four are edited together and stay aligned: Move Node → Update Edges → Update Faces → Update Features. You do not have to switch layers to do this. Click a vertex and TatukGIS determines whether it belongs to a Node or an Edge and edits the correct primitive. To reshape a boundary without changing what connects to what, move the internal vertices of its Edge. Where the data lives SQLite topology is a local database with no server to install. It suits desktop and single-user work, and projects are easy to move. PostGIS Topology and Oracle Topology are meant for multi-user editing and large central databases, and require a TatukGIS Enterprise license. The topology model is the same on all three databases. Starting from existing data Most users will not start from an empty map. The Create Topology wizard can build a topology directly from an existing layer. Data from other systems usually brings slivers and small invalid pieces with it. Auto Fix Import Errors merges invalid Features into the nearest valid neighbor automatically, and Merge Feature into Neighbor does the same manually when you want to choose the target yourself. Repair import errors before building hierarchies on top of the data. Read more in the guide: Geometry Editing, Topology Tools Overview Getting started in TatukGIS Editor For an end user, working with topology is close to normal GIS editing. Everything is in one Topology menu: Create Topology, Create Feature Layer, Create Feature, Add Element(s) to Feature, Delete Feature Element, the two repair tools, Settings, and Rollback. Each command opens a short wizard. The Create Topology wizard takes four steps: Start with an empty topology or import an existing layer. Choose the database (SQLite, PostGIS, or Oracle) and the topology type (Polygon, Line, or Network Data). Set the coordinate system and extent. Enter the topology name, schema name, output folder, tolerance, and precision. PostGIS and Oracle add one page for the connection details. With a schema named NEW, the wizard creates the project and three primitive layers: NEW_NODE, NEW_EDGE, and NEW_FACE. From there you draw Nodes and Edges, create a base Feature Layer on NEW_FACE (or on NEW_EDGE for Line topology), turn Faces into Features, and add higher levels as needed. The main new habit to learn is to move Nodes, not polygon corners. Read more in the guide: Creating a New Topology, Creating Topological Features In your own application For developers the effort is low as well, because the difficult work is done inside the engine. Every edit is checked against its neighbors. Intersections are detected and Edges split without losing precision. Faces are rebuilt as soon as a boundary closes. Every change is correctly passed through any number of hierarchy levels in the same way on SQLite, PostGIS, and Oracle. Building and testing that engine took the TatukGIS team a long time and a great deal of effort, and all of it sits behind one class. That class, TGIS_TopoTool, is the high-level API used in the code below. It adds the topology wizards from the Editor's Topology menu to your existing application and works with the viewer, legend, and optional attributes control you already have. Create it once and open any wizard with a single RunTool call: adding topology to an existing application comes down to wiring a few menu items. The tool handles Nodes, Edges, Faces, and hierarchy updates internally and, like the Editor, it runs a workflow only when the current state of the project allows it. A low-level API for adding Nodes and Edges to a topology layer directly from code will be available in a later release. // High-level API: adds the topology wizards to an existing application. // Nodes and Edges are then drawn with the standard editing tools. uses GisRtl, GisTopoTool, VCL.AllPvl; procedure TfrmTopology.FormCreate(Sender: TObject); begin // viewer, legend and attributes controls placed on the form fTopoTool := TGIS_TopoTool.Create( Self, GIS, gisLegend, gisAttributes ) ; end; // one line per menu item or ribbon button procedure TfrmTopology.menuTopoCreateTopologyClick(Sender: TObject); begin fTopoTool.RunTool( TGIS_TopoTools.CreateTopology ) ; end; procedure TfrmTopology.menuTopoCreateFeatureClick(Sender: TObject); begin fTopoTool.RunTool( TGIS_TopoTools.CreateTopoFeature ) ; end; procedure TfrmTopology.menuTopoRollbackClick(Sender: TObject); begin fTopoTool.Rollback ; end; procedure TfrmTopology.menuSaveClick(Sender: TObject); begin if GIS.MustSave then GIS.SaveAll ; end; procedure TfrmTopology.FormDestroy(Sender: TObject); begin FreeObject( fTopoTool ) ; end; TGIS_TopoTools covers the whole Topology menu: CreateTopology, CreateFeatureLayer, DeleteFeatureLayer, CreateTopoFeature, DeleteTopoFeature, AddElementsToTopoFeature, DeleteTopoFeatureElement, AutoFixTopoImportErrors, and ManualFixTopoImportErrors. OpenSettingsForm shows the settings dialog, and Rollback discards all topology edits since the last commit. DK for .NET exposes the same class, methods, and values. Nodes and Edges are edited with the standard DK editing framework, using the same viewer modes and editor operations as any other vector layer. Topology extends that framework rather than replacing it, so an application that already supports editing can reuse that code for topology layers. The TopologyLayer sample shows the tool inside a complete editing application, with source code. Read more in the guide: High-Level API Integration, Basic GIS Editing Framework, TGIS_TopoTool (Delphi), TGIS_TopoTool (.NET), TopologyLayer sample The bottom line With the TatukGIS Topology Layer, the engine takes over responsibility for keeping the data consistent. Each polygon boundary or line is drawn once, and TatukGIS keeps every parcel, district, pipe, cable, and junction aligned. Your team spends less time fixing errors, and every calculation and analysis runs on clean data. To go further, read the Topology Layer guide, open the TopologyLayer sample that ships with the DK, or download a trial of DK for Delphi, DK for .NET, or TatukGIS Editor and try it with your own data. Posted: October 05, 2026 Filed under: Developer, DK, Editor, Kernel, Layer, Line, Polygon, TatukGIS, Topology