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 "mymultipoint" 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't know if you understand what I'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> <<a href="mailto:schabi@logix-tt.com">schabi@logix-tt.com</a>> 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>"Rodrigo Martín LÓPEZ GREGORIO" <<a href="mailto:rodrigomlg@yahoo.com.ar">rodrigomlg@yahoo.com.ar</a>> wrote:<br><br>> I'm creating a postgres function and I need that it returns a multipoint
<br>> geometry so then I access to the geometry returned using the<br>> geometryN(mymultipoint) function.<br>><br>> I create "mymultipoint" variable like:<br>><br>> mymultipoint geometry;<br>>
<br>> but I could not find the way to add points to that geometry, except using a<br>> linestring and using the AddPoint() function. I dont know if there is a way<br>> to add some points to a geometry and then access its using the geometryN()
<br>> function, but that is what I'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&Tracing International AG<br>Dipl. Inf. | 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>