[postgis-users] how to convert GeometryCollection to multipolygon shape

Rémi Cura remi.cura at gmail.com
Sun Apr 27 07:18:08 PDT 2014


SELECT ST_CollectionExtract(geom,3)<http://postgis.refractions.net/docs/ST_CollectionExtract.html>AS
geom
FROM your_table_with_mixed_geometry<http://postgis.refractions.net/docs/ST_CollectionExtract.html>

It will not change polygon or multi polygon, but will extract it from
geometry collection.

CHeers,
Rémi-C


2014-04-25 19:40 GMT+02:00 <islanis at infomed.sld.cu>:

> islanis at infomed.sld.cu escribió:
>
>
>  "Rémi Cura" <remi.cura at gmail.com> escribió:
>>
>> 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.
>>
>> something like this is that i want.
>>
>>  Hey,
>>> have a look at ST_CollectionExctract.
>>> http://postgis.refractions.net/docs/ST_CollectionExtract.html
>>>
>>> Cheers,
>>> Rémi-C
>>>
>> How can i use it, please give an exmaple
>
>
>
>>>
>>> 2014-04-25 19:08 GMT+02:00 <islanis at infomed.sld.cu>:
>>>
>>>  Hi people i need help in converting a shape that have a
>>>> GeometryCollection
>>>> data to a multipolygon shape, at least a routine or a function that do
>>>> that.
>>>>
>>>> thanks
>>>>
>>>> ----------------------------------------------------------------
>>>> This message was sent using IMP, the Internet Messaging Program.
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> 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
>>>>
>>>> Infomed: http://www.sld.cu/
>>>>
>>>> _______________________________________________
>>>> postgis-users mailing list
>>>> postgis-users at lists.osgeo.org
>>>> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>>>>
>>>>
>>>
>>
>>
>> ----------------------------------------------------------------
>> This message was sent using IMP, the Internet Messaging Program.
>>
>>
>>
>> --
>>
>> 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
>>
>> Infomed: http://www.sld.cu/
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at lists.osgeo.org
>> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>>
>
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
>
>
> --
>
> 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
>
> Infomed: http://www.sld.cu/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20140427/470712a3/attachment.html>


More information about the postgis-users mailing list