Hi List,<br><br>What is the best way of converting a geometry collection to a multipolygon in PostGIS 2.0? I have tried the following approach:<br><br>st_multi (<br> st_union (<br> st_intersection (<br> st_buffer (t.point, radius), s.geom<br>
) <br> )<br> ) as geom<br><br>This results in the following error message: <br>"ERROR: Geometry type (GeometryCollection) does not match column type (MultiPolygon) SQL state: 2202" <br>
and I don't understand why I am getting this message. I've also seen
examples that use st_dump/st_collect using but am less sure if this
returns a multipolygon:<br><br>st_collect (<br> st_dump (<br> st_intersection (<br>
st_buffer (t.point, radius), s.geom<br> ) <br> )<br> ) as geom<br><br>Which approach should I use? My intersection query can return a single geometry or a geometry collection.<br>
<br>Thanks,<br>David