[postgis-users] topology, joining attributes

Rémi Cura remi.cura at gmail.com
Wed Jul 23 01:49:47 PDT 2014

the mapping is not direct.
it would be :
your topogeom -> (topogeom_id) relation table (element_id)-> (face_id) face.
Maybe this schema can help you :

Your querry could look like this:

SELECT my_topogeom, f.face_id
FROM my_table AS mt
INNER JOIN relation AS r ON (((mt.mytopogeom).id ,
(mt.mytopogeom).layer_id)) = (r.topogeo_id, r.layer_id  )
INNER JOIN face AS f ON (r.element_id = f.face_id)


2014-07-23 3:17 GMT+02:00 Richard Greenwood <richard.greenwood at gmail.com>:

> I have a table of simple polygons named work.aliquot with a primary key
> named ogc_fid and several columns of attribute data. I created a topology
> and added a topogeometry column and then:
> UPDATE aliquot SET topogeom = toTopoGeom(wkb_geometry, 'aliquot_topology',
> 1);
> The various fields and tables all appear to have been populated correctly.
> Now I need to join the attributes from the work.aliquot table to
> aliquot_topology.face but I'm stuck. I was guessing that
> aliquot_topology.relation would be the route but after some experimenting
> that seems not to be the case, or else I'm not getting it. Do I have to do
> a spatial join to get my attributes from the source table into my new
> topology?
> Thanks,
> Rich
> --
> Richard W. Greenwood, PLS
> www.greenwoodmap.com
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20140723/c45c02b7/attachment.html>

More information about the postgis-users mailing list