[postgis-devel] [postgis-users] linking 2 topogeometries of different nature
Rémi Cura
remi.cura at gmail.com
Tue Oct 22 08:17:55 PDT 2013
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 )
I'm going to try to do first : get line from point, get point from line,
but of course this all should be one function.
GetRelated, working for any combination :
ANY[puntal,lineal,areal] related to ANY[puntal,lineal,areal]
I don't like to put layer_id directly as input in function because it is
not a number user fixed.
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)
Cheers,
Rémi-C
2013/10/22 Sandro Santilli <strk at keybit.net>
> 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;
> _______________________________________________
> 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-devel/attachments/20131022/c099e973/attachment.html>
More information about the postgis-devel
mailing list