[postgis-users] Creating polygons from lines fails

Kevin Neufeld kneufeld at refractions.net
Mon May 4 17:45:34 PDT 2009


Use ST_Polygonize() or ST_BuildArea() depending on your preference.

ie.
SELECT attribute1, attribute2, ST_BuildArea(ST_Collect(my_line_geom))
FROM my_line_table
GROUP BY attribute1, attribute2;

-- Kevin

Stefan Donath wrote:
> Hi
>
> I need to create polygons from lines. Using OpenJUMP it works fine 
> with the geometry but I'm loosing all attribute data!
>
> Could anyone please tell me how to do that in PostGIS!
>
> Thanks a lot - Stefan.
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users



More information about the postgis-users mailing list