[postgis-users] How to clean a geometrycollections table for pgsql2shp?

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Thu Nov 24 08:49:08 PST 2011


Hi,

When doing intersections between two tables containing many polygons the resulting table often contains geometrycollections of points, polylines and polygons. You have to clean such a table of point and lines if you want to export it as a polygon shapefile.

Isn't there a function in PostGIS to remove line and points from a table of geometrycollections?

SELECT ST_ExtractPolygons(geom) FROM mymessyresults ?

Thanks

Pierre 



More information about the postgis-users mailing list