[postgis-users] Linestrings to polygons

Stephen Woodbridge woodbri at swoodbridge.com
Fri Mar 6 13:50:43 PST 2009


Martin Fafard wrote:
> Hi
> 
> How to convert linestring to polygons? Linetrings are not "closed" but 
> snap each other.

Look at

select ST_BuildArea(the_geom) from mytable where <select your linestrings>;

you might need to collect(the_geom) if it is expecting a single object.

-Steve



More information about the postgis-users mailing list