Before we start working with topology, we need to discuss the key concepts behind the PostGIS topological data model. PostGIS topology implementation is based on ISO standard 13249 - Information technology - Database languages - SQL multimedia and application packages - Part 3: Spatial. The standard name is often abbreviated as ISO SQL/MM. This standard defines two data models for topology: TopoGeometry
and TopoNetwork
; PostGIS implements only the former.
In this model, there are three kinds of elements/primitives used to compose geospatial features: nodes, edges, and faces.
Nodes are point features. They can exist on their own (isolated nodes) or serve as connection points for linear features (the edges). For example, this is a Czech-Polish-Slovak tripoint near Jaworzynka village, which contains a node and three edges:
An example of topological data: a node and three edges
In topology, only one node can appear for a specified coordinate pair - if there are more nodes in...