[postgis-users] Collecting Polygons

Lee Hachadoorian lee.hachadoorian at gmail.com
Fri Jun 27 10:45:54 PDT 2008


Upgraded to 1.3.3 to get rid of previous problem with ST_Collect, but
I'm still not getting the output I want.  What I want to do is take
several polygons and mash them together into one polygon.  The SQL I
am using is:

SELECT ST_Collect(the_geom)
FROM proj_mortgage.geo_hh_race
WHERE pct_hispanic > 50;

But ST_Collect returns a GEOMETRYCOLLECTION, and I want a polygon or
multipolygon.  Do I need to do something with the GEOMETRYCOLLECTION
returned by ST_Collect, or is ST_Collect the wrong function to use in
the first place?

Thanks,
Lee Hachadoorian
PhD Student, Geography
Program in Earth & Environmental Sciences
CUNY Graduate Center



More information about the postgis-users mailing list