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

Garret W garretlewis at gmail.com
Fri May 27 15:26:49 PDT 2016


thanks for the quick reply strk

>How do you think they should?
My understanding was in order to associate your attributes from your
original data to the new topological geometry you would be joining them
like it is done here:

SELECT r.road_type, r.road_name, e.geomFROM roads_topo.edge e,
     roads_topo.relation rel,
     roads rWHERE e.edge_id = rel.element_id
  AND rel.topogeo_id = (r.topo_geom).id

Which came from this answer in stackexchange
http://gis.stackexchange.com/a/71756

In my case thought for some reason topogeo_id is not that same ID that is
given in the original data.

>Where's the statement creating the "temp_trails" table ?
i just used

create public.temptrails as select * from production.trails;
alter table public.temptrails add primary key (trails_id);

>The attributes should be associated to the TopoGeometry objects (for
>example in "temp_trails"), not to the records in the relation table.

Hmm...From the results I get I dont see how that would be. I dont see
anything that relates directly back to the original data.

As I had mentioned before, testing out how to associate the original
attributes back to the topological geometry worked using the select
statement above (the one from stackexchange).

Hopefully that all makes sense.
Garret

On Fri, May 27, 2016 at 3:13 PM, Sandro Santilli <strk at kbt.io> wrote:

> On Fri, May 27, 2016 at 02:34:24PM -0500, Garret W wrote:
>
> > After creating a topology on a trail network, the unique IDs used in my
> > dataset are not the showing up as they should in relations.topogeo_id.
>
> How do you think they should ?
>
> > Here are my steps (pretty standard):
> >
> > SELECT CreateTopology('trails_topo', 3435);
> > SELECT AddTopoGeometryColumn('trails_topo', 'myschema', 'temp_trails',
> > 'topogeom', 'LINESTRING');
> > UPDATE public.temp_trails SET topogeom = toTopoGeom(geom, 'trails_topo',
> 1,
> > 3);
>
> Where's the statement creating the "temp_trails" table ?
>
> > Afterwards Im just using the relations table to join the attributes to
> the
> > new topological data.
>
> The attributes should be associated to the TopoGeometry objects (for
> example
> in "temp_trails"), not to the records in the relation table.
>
> --strk;
>
>   ()   Free GIS & Flash consultant/developer
>   /\   https://strk.kbt.io/services.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20160527/b169b34c/attachment.html>


More information about the postgis-users mailing list