I have created a PostGIS topology table by importing a shapefile and following a tutorial online. I can now load the edges and nodes into QGIS. But I am not seeing the edges and nodes tables anywhere when I look at the database in PgAdmin. Where are they being stored? I am making modifications to the edges and nodes tables in QGIS and I need to verify that they are being added properly.
Topology functions are stored in the
topology schema, topology data (edges, faces, nodes, relations) are stored in a user-defined schema, and relations (topo id, layer id, element id, element type) are stored with the geometry data.
From the command line you can view tables in the
topology schema with:
SELECT * FROM information_schema.tables WHERE table_schema = 'topology';
With pgAdminIII it looks like this:
Once you create a topology and add data to a layer in that topology, then the
topology.layer tables will each have one record in them.
Creating the toplogy with CreateTopology would look like this:
SELECT topology.CreateTopology('me_topo', 4326, 0.0001);
And adding data to that topology with AddTopoGeometryColumn would look something like this:
SELECT topology.AddTopoGeometryColumn('me_topo', 'public', 'me_counties', 'topo', 'MULTIPOLYGON');
Finally set the topology data in the new
topo column with toTopoGeom:
UPDATE me_counties SET topo = topology.toTopoGeom(geom, 'me_topo', 1);
Now you will be able to see the edge, face and node data in the