Thanks Nicolas, what about something like <div>







<p class="p1"><b>ST_GeomFromText('POLYGON((0 0 -1,2 0 -2,1 2 -1 ,0 0 -2))')</b></p><p class="p1">would that work?</p><br><div class="gmail_quote">On Mon, Oct 8, 2012 at 4:34 PM, Nicolas Ribot <span dir="ltr"><<a href="mailto:nicolas.ribot@gmail.com" target="_blank">nicolas.ribot@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
You could create triangles by calling st_makeLine and st_makePolygon:<br>
<br>
select st_makePolygon(st_makeLine('{point1, point2, point3, point1}'))<br>
from triangles<br>
(the 4 points are put in a array before calling makeLine).<br>
<br>
Yes for the Gist index on the column.<br>
<br>
Nicolas<br>
<div><div class="h5"><br>
On 8 October 2012 16:03, Ed Linde <<a href="mailto:edolinde@gmail.com">edolinde@gmail.com</a>> wrote:<br>
> Hi All,<br>
> I am looking at an easy way to load a lot of triangles into a geometry<br>
> column. Wondering what is the best way to<br>
> create a triangle when I have 3 points? Is there a function I can use?<br>
> Also can I just index this column with Gist and then query against a box I<br>
> make to see what triangles intersect<br>
> with this rectangle?<br>
><br>
> Cheers,<br>
> Ed<br>
><br>
</div></div>> _______________________________________________<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" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
><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" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
</blockquote></div><br></div>