[postgis-users] how to polygonize a not closed linestring?

Arnaud Lesauvage arnaud.listes at supermail.fr
Thu Aug 9 03:22:20 PDT 2007


I don't know about the polygonize stuff, but 

Stefan Zweig a écrit :
> is there maybe another way to insert the first point again after the last point?

Here you can use ST_AddPoint :

ST_AddPoint(linestring, point, [<position>])
Adds a point to a LineString before point <pos> (0-based index). Third parameter can be omitted or set to -1 for appending.

So "ST_AddPoint(the_geom, ST_PointN(the_geom, 1))" would return the_geom with its first point appended at the end.


Regards,
--
Arnaud



More information about the postgis-users mailing list