Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm currently using PostGIS topology extension, but I have some difficulties in understanding how the structure works:

One of the key points is the use of "layer"s: as of what I understand, features attributes should be stored in a table out of the topology's schema (the one named topo_actualname) and registered as a layer of that topology with AddTopoGeometryColumn.

However, is there a simple way to join the attributes (stored in the layer table) with the respective features (elements in the node, face, or edge_data)?

Now, what I do is:

SELECT whatever
FROM layer_tb l
     JOIN topo_topologyname.edge_data e ON (l.topo).id=edge_id;

But I guess the whole layer concept is rather useless if I have to know both the topology schema name and the layer name to get the information I want.

In fact I think I understood that the topo column on the layer has enough information to know where the respective topology is, and moreover the topology schema stores a reference to each layer table for each topology.

Is there a short/simple/proper way to join information together? I was looking for something in the topology extension functions, but couldn't find anything useful.

share|improve this question
I'm a bit lost on how you're supposed to leverage topologies, too, but this might help. You can cast a TopoGeometry directly to a geometry: SELECT whatever, ST_AsText(topogeom::geometry) FROM layer_tb. The thing is that if the edges get split later on, it seems that the geometry might change as a result. – jpmc26 Aug 27 '14 at 1:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.