[postgis-devel] [postgis-users] linking 2 topogeometries of different nature

Sandro Santilli strk at keybit.net
Tue Oct 22 08:52:01 PDT 2013


On Tue, Oct 22, 2013 at 05:17:55PM +0200, RĂ©mi Cura wrote:
> I'm sorry for being so disorganized,
> I lack experience with postgis_topology.
> 
> It is only the 3d function I write for it.
> 
> I was supposing you would need the layer_id in case there are multiple
> topogeom columns in one table.
> 
> Still I don't see a use case for having multiple topogeom columns in the
> same table, even if I do use multiple geom columns for one table sometimes.
> 
> I totally agree with your others conclusions and proposed signature
> SET OF topogeometry GetRelatedLineal(
>            a_source_lineal_topogeom TOPOGEOMETRY,
>            a_target_puntal_topogeom_layer_id INT )

Note that there's no problem with having multiple TopoGeometry columns in
the same table, as long as you reference a each column (layer) by the
"topology_id"/"layer_id" pair (topology.layer primary key).

> I don't like to put layer_id directly as input in function because it is
> not a number user fixed.

In that case you can specify (schema_name, table_name, feature_column),
which _also_ identifies rows in topology.layer.

> I think I can live with that as I wrote a function to get layer id from the
> topogeom name :
> public.rc_getlayerid(layer_name text, layer_schema text DEFAULT ''::text)

Missing a column name here ? 

--strk;



More information about the postgis-devel mailing list