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

Sandro Santilli strk at keybit.net
Tue Oct 22 07:57:23 PDT 2013


On Tue, Oct 22, 2013 at 04:26:46PM +0200, Rémi Cura wrote:
> For generality sack,
> 
> topogeometry output may be better.
> 
> SET OFtopogeometry GetRelatedLineal( a_source_lineal_topogeom TOPOGEOMETRY,
> a_target_puntal_topogeom_name TEXT (or REGCLASS),
> a_target_puntal_topogeom_layer_id
> INT )

I'm not sure you need 2 arguments for the puntal side.
Are those really "topology_name" and "layer_id" ?

The <table>.<field> identifier, as you reported being the meaning of
"topogeom_name" in your previous name, is really only the canonical
deploy table for TopoGeometry objects of a given topology layer,
so could be derived by "topology_name"/"layer_id".

Additionally, if you only make this work within a single topology
(very likely) you can derive topology name from the first argument
(the lineal TopoGeometry) so that you're left with:

SET OF topogeometry GetRelatedLineal(
           a_source_lineal_topogeom TOPOGEOMETRY,
           a_target_puntal_topogeom_layer_id INT )

I think it'll need a few more iterations, but it's moving :)

For example, why "related" is assumed to be points ?
Aren't lineal TopoGeoms also possibly related to areal ?

--strk;


More information about the postgis-users mailing list