[postgis-users] Loading triangles

Ed Linde edolinde at gmail.com
Mon Oct 8 07:39:46 PDT 2012


Thanks Nicolas, what about something like

*ST_GeomFromText('POLYGON((0 0 -1,2 0 -2,1 2 -1 ,0 0 -2))')*

would that work?

On Mon, Oct 8, 2012 at 4:34 PM, Nicolas Ribot <nicolas.ribot at gmail.com>wrote:

> Hi,
>
> You could create triangles by calling st_makeLine and st_makePolygon:
>
> select st_makePolygon(st_makeLine('{point1, point2, point3, point1}'))
> from triangles
> (the 4 points are put in a array before calling makeLine).
>
> Yes for the Gist index on the column.
>
> Nicolas
>
> On 8 October 2012 16:03, Ed Linde <edolinde at gmail.com> wrote:
> > Hi All,
> > I am looking at an easy way to load a lot of triangles into a geometry
> > column. Wondering what is the best way to
> > create a triangle when I have 3 points? Is there a function I can use?
> > Also can I just index this column with Gist and then query against a box
> I
> > make to see what triangles intersect
> > with this rectangle?
> >
> > Cheers,
> > Ed
> >
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> >
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20121008/200d6968/attachment.html>


More information about the postgis-users mailing list