<div dir="ltr"><div><div><div>SELECT <a href="http://postgis.refractions.net/docs/ST_CollectionExtract.html" target="_blank">ST_CollectionExtract(geom,3)</a> AS geom<br></div>FROM your_table_with_mixed_geometry<a href="http://postgis.refractions.net/docs/ST_CollectionExtract.html" target="_blank"></a><br>
<br></div>It will not change polygon or multi polygon, but will extract it from geometry collection.<br><br></div>CHeers,<br>Rémi-C<br><div class="gmail_extra"><br><br><div class="gmail_quote">2014-04-25 19:40 GMT+02:00  <span dir="ltr"><<a href="mailto:islanis@infomed.sld.cu" target="_blank">islanis@infomed.sld.cu</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><a href="mailto:islanis@infomed.sld.cu" target="_blank">islanis@infomed.sld.cu</a> escribió:<div class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
"Rémi Cura" <<a href="mailto:remi.cura@gmail.com" target="_blank">remi.cura@gmail.com</a>> escribió:<br>
<br>
But what I want is to homogenize an entire layer, for example, a layer containing both multipolygons and collections, bring all components of this layer to multipolygons.<br>
<br>
something like this is that i want.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hey,<br>
have a look at ST_CollectionExctract.<br>
<a href="http://postgis.refractions.net/docs/ST_CollectionExtract.html" target="_blank">http://postgis.refractions.<u></u>net/docs/ST_CollectionExtract.<u></u>html</a><br>
<br>
Cheers,<br>
Rémi-C<br>
</blockquote></blockquote></div>
How can i use it, please give an exmaple<div class="HOEnZb"><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
2014-04-25 19:08 GMT+02:00 <<a href="mailto:islanis@infomed.sld.cu" target="_blank">islanis@infomed.sld.cu</a>>:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi people i need help in converting a shape that have a GeometryCollection<br>
data to a multipolygon shape, at least a routine or a function that do that.<br>
<br>
thanks<br>
<br>
------------------------------<u></u>------------------------------<u></u>----<br>
This message was sent using IMP, the Internet Messaging Program.<br>
<br>
<br>
<br>
--<br>
<br>
Este mensaje le ha llegado mediante el servicio de correo electronico que<br>
ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema<br>
Nacional de Salud. La persona que envia este correo asume el compromiso de<br>
usar el servicio a tales fines y cumplir con las regulaciones establecidas<br>
<br>
Infomed: <a href="http://www.sld.cu/" target="_blank">http://www.sld.cu/</a><br>
<br>
______________________________<u></u>_________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-<u></u>bin/mailman/listinfo/postgis-<u></u>users</a><br>
<br>
</blockquote>
<br>
</blockquote>
<br>
<br>
<br>
------------------------------<u></u>------------------------------<u></u>----<br>
This message was sent using IMP, the Internet Messaging Program.<br>
<br>
<br>
<br>
--<br>
<br>
Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema Nacional de Salud. La persona que envia este correo asume el compromiso de usar el servicio a tales fines y cumplir con las regulaciones establecidas<br>

<br>
Infomed: <a href="http://www.sld.cu/" target="_blank">http://www.sld.cu/</a><br>
<br>
______________________________<u></u>_________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-<u></u>bin/mailman/listinfo/postgis-<u></u>users</a><br>
</blockquote>
<br>
<br>
<br>
------------------------------<u></u>------------------------------<u></u>----<br>
This message was sent using IMP, the Internet Messaging Program.<br>
<br>
<br>
<br>
--<br>
<br>
Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema Nacional de Salud. La persona que envia este correo asume el compromiso de usar el servicio a tales fines y cumplir con las regulaciones establecidas<br>

<br>
Infomed: <a href="http://www.sld.cu/" target="_blank">http://www.sld.cu/</a><br>
<br>
</div></div></blockquote></div><br></div></div>