Thanks for your answer.<br><br>I think that GeomUnion could work. However I have a problem. In my function I have some IF statements that adds points depending on different conditions to &quot;mymultipoint&quot; variable. So what I had to do to add points to mymultipoint variable was:
<br><br>mymultipoint:=GeomUnion(newpoint,mymultipoint);<br><br>But if mymultipoint variable has not points yet, this doesnt work so I must check in every assignment if mymultipoint variable is null or empty or something like that. However I think that there may be a much simple way to do that. I think that must be something like addpoint(mymultipoint,newpoint).
<br>Another solution could be initialize mymultipoint variable in some way that not implies adding a point.<br><br>I don&#39;t know if you understand what I&#39;m trying to do... just a function that returns a MULTIPOINT variable with a undetermined number of points that depends on some conditions.
<br><br>Thanks.<br><br>Rodrigo.<br><br><div><span class="gmail_quote">On 2/14/07, <b class="gmail_sendername">Markus Schaber</b> &lt;<a href="mailto:schabi@logix-tt.com">schabi@logix-tt.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi, Rodrigo,<br><br>&quot;Rodrigo Martín LÓPEZ GREGORIO&quot; &lt;<a href="mailto:rodrigomlg@yahoo.com.ar">rodrigomlg@yahoo.com.ar</a>&gt; wrote:<br><br>&gt; I&#39;m creating a postgres function and I need that it returns a multipoint
<br>&gt; geometry so then I access to the geometry returned using the<br>&gt; geometryN(mymultipoint) function.<br>&gt;<br>&gt; I create &quot;mymultipoint&quot; variable like:<br>&gt;<br>&gt; mymultipoint geometry;<br>&gt;
<br>&gt; but I could not find the way to add points to that geometry, except using a<br>&gt; linestring and using the AddPoint() function. I dont know if there is a way<br>&gt; to add some points to a geometry and then access its using the geometryN()
<br>&gt; function, but that is what I&#39;m looking for.<br><br>I see several options:<br><br>Use geomunion() or collect() to collect and merge your points.<br><br>Create a String representation, and use GeomFromEWKT(), GeomFromText()
<br>or MPointFromText().<br><br><br><br>Regards,<br>Markus<br><br>--<br>Markus Schaber | Logical Tracking&amp;Tracing International AG<br>Dipl. Inf.&nbsp;&nbsp;&nbsp;&nbsp; | Software Development GIS<br><br>Fight against software patents in Europe! 
<a href="http://www.ffii.org">www.ffii.org</a><br><a href="http://www.nosoftwarepatents.org">www.nosoftwarepatents.org</a><br>_______________________________________________<br>postgis-users mailing list<br><a href="mailto:postgis-users@postgis.refractions.net">
postgis-users@postgis.refractions.net</a><br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br></blockquote></div><br>