<div dir="ltr">I'm sorry for being so disorganized,<div>I lack experience with postgis_topology.<br><br></div><div>It is only the 3d function I write for it.<br><br>I was supposing you would need the layer_id in case there are multiple topogeom columns in one table.<br>
</div><div><br></div><div>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.<br></div><div><br></div><div>I totally agree with your others conclusions and proposed signature</div>
<div><span style="font-family:arial,sans-serif;font-size:12.666666984558105px">SET OF topogeometry GetRelatedLineal(</span><br style="font-family:arial,sans-serif;font-size:12.666666984558105px"><span style="font-family:arial,sans-serif;font-size:12.666666984558105px">           a_source_lineal_topogeom TOPOGEOMETRY,</span><br style="font-family:arial,sans-serif;font-size:12.666666984558105px">
<span style="font-family:arial,sans-serif;font-size:12.666666984558105px">           a_target_puntal_topogeom_</span><span style="font-family:arial,sans-serif;font-size:12.666666984558105px">layer_id INT )</span><br></div>
<div><span style="font-family:arial,sans-serif;font-size:12.666666984558105px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:12.666666984558105px">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.</span></div>
<div><span style="font-family:arial,sans-serif;font-size:12.666666984558105px">GetRelated, working for any combination :</span></div><div><br>ANY[puntal,lineal,areal] related to ANY[puntal,lineal,areal] </div><div><br></div>
<div><br></div><div>I don't like to put layer_id directly as input in function because it is not a number user fixed.</div><div><br></div><div>I think I can live with that as I wrote a function to get layer id from the topogeom name :</div>
<div>public.rc_getlayerid(layer_name text, layer_schema text DEFAULT ''::text)<br><br>Cheers,</div><div>Rémi-C</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/10/22 Sandro Santilli <span dir="ltr"><<a href="mailto:strk@keybit.net" target="_blank">strk@keybit.net</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Tue, Oct 22, 2013 at 04:26:46PM +0200, Rémi Cura wrote:<br>
> For generality sack,<br>
><br>
> topogeometry output may be better.<br>
><br>
> SET OFtopogeometry GetRelatedLineal( a_source_lineal_topogeom TOPOGEOMETRY,<br>
> a_target_puntal_topogeom_name TEXT (or REGCLASS),<br>
> a_target_puntal_topogeom_layer_id<br>
> INT )<br>
<br>
</div>I'm not sure you need 2 arguments for the puntal side.<br>
Are those really "topology_name" and "layer_id" ?<br>
<br>
The <table>.<field> identifier, as you reported being the meaning of<br>
"topogeom_name" in your previous name, is really only the canonical<br>
deploy table for TopoGeometry objects of a given topology layer,<br>
so could be derived by "topology_name"/"layer_id".<br>
<br>
Additionally, if you only make this work within a single topology<br>
(very likely) you can derive topology name from the first argument<br>
(the lineal TopoGeometry) so that you're left with:<br>
<br>
SET OF topogeometry GetRelatedLineal(<br>
           a_source_lineal_topogeom TOPOGEOMETRY,<br>
           a_target_puntal_topogeom_layer_id INT )<br>
<br>
I think it'll need a few more iterations, but it's moving :)<br>
<br>
For example, why "related" is assumed to be points ?<br>
Aren't lineal TopoGeoms also possibly related to areal ?<br>
<div class="HOEnZb"><div class="h5"><br>
--strk;<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
</div></div></blockquote></div><br></div>