The topology extension is not enabled automatically with basic PostGIS functionality. In order to use topology functions, they have to be activated using a PostgreSQL CREATE EXTENSION statement:
CREATE EXTENSION postgis_topology;
This will add topology functions to a database, and create metadata tables in it. Let's have a closer look at them.
We can see a newly created topology schema. It contains topology functions and two metadata tables:
- Topology: Storing information about separate topologies in a database
- Layer: Storing information about topological layers
A topology in PostGIS is a collection of topological elements (nodes, edges, and faces) with specified precision, coordinate system, and dimensionality (2D or 3D). Every topology is stored in a separate schema. A layer is a relationship between topology and a feature table. Each topology can have zero or more layers, and same topological...