[postgis-users] topology - topogeo_id <> mylayer.mypk

Garret W garretlewis at gmail.com
Mon May 30 20:33:07 PDT 2016

Yes the table was "temp_trails", sorry for the typo.

I see what you are saying with the how geometries are updated with the set
topogeom etc. It makes sense to me.

I think because this is my first time using topology in Postgis that I
misunderstand what the results should look like. But I see now.

My end goal was to get topologically correct data, and split the lines at
intersections (the latter can not be provided by topogeom column in the
original data)...with this in mind I would need to use the geometries
created in one of the edge tables and associate it back to the original
attributes. Correct? In which case, Im assuming I could use the same
statement as the one I had mentioned earlier for joining.

What I dont understand is why in some cases the relations table has been
assigned the correct IDs from the original table and when it seems to
provide its own. The only thing I have been able to do to make sure I can
join each line back to its original attributes is to create a temporary
table in public, give it a brand new primary key, and then the ID seem to
carry over fine.


On Sun, May 29, 2016 at 4:40 PM, Sandro Santilli <strk at kbt.io> wrote:

> On Fri, May 27, 2016 at 05:26:49PM -0500, Garret W wrote:
> > create public.temptrails as select * from production.trails;
> > alter table public.temptrails add primary key (trails_id);
> Wasn't it called "temp_trails" ?
> > I dont see anything that relates directly back to the original data.
> If you confirm the table was "temp_trails", here's how the geometries
> get to relate to the original data (from your initial mail):
>  UPDATE public.temp_trails SET topogeom = toTopoGeom(geom, 'trails_topo',
> ...
> So you would have all the data associated within that table,
> with each "topogeom" value being composed by a set of primitive
> edges.
> While associating data directly to edge records would be possible,
> it is not a recommended design.
> --strk;
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20160530/b5a78145/attachment.html>

More information about the postgis-users mailing list