Hello,
If you want also declare polygons as multipolygons ("bring all components of
this layer to multipolygons"), you can use
ST_Multi(ST_CollectionExtract(geom,3))
Hugues.
De : [email protected]
[mailto:[email protected]] De la part de Rémi Cura
Envoyé : dimanche 27 avril 2014 16:18
À : J.Alejandro Martinez Linares
Cc : PostGIS Users Discussion
Objet : Re: [postgis-users] how to convert GeometryCollection tomultipolygon
shape
SELECT ST_CollectionExtract(geom,3) AS geom
FROM your_table_with_mixed_geometry
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 <[email protected]>:
[email protected] escribió:
"Rémi Cura" <[email protected]> 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 <[email protected]>:
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
[email protected]
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
[email protected]
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
[email protected]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users