[postgis-users] Geometrycollection to Multipolygon

Obe, Regina robe.dnd at cityofboston.gov
Wed Apr 23 05:24:10 PDT 2008


This sometimes does the trick for me if they actually can be unioned
 
 ST_Union(GEOMCOLL, ST_GeomFromText('GEOMETRYCOLLECTION(EMPTY)', yoursridhere) )
 
(your number 2 doesn't work because that is the aggregate form, not because ST_Union can't handle geometry collections I think)
 
 
Hope that helps,
Regina

________________________________

From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Düster Horst
Sent: Wednesday, April 23, 2008 2:25 AM
To: postgis-users
Subject: [postgis-users] Geometrycollection to Multipolygon


I do have a Geometrycollection which consists of a collection of Multipolygons and Polygons. My aim is to create one single Multipolygon from the mentioned Geometry collection.

Until now I tried the following steps without result:

1. ST_BUFFER(GEOMCOLL,0.0) => It works but all inner rings of my input geometry are lost.
2. ST_UNION(GEOMCOLL) => doesn't work with Geometrycollections

Does anyone has a solution to solve my problem?

Best regards
Horst

------------------------------------------------

Dr. Horst Düster
GIS-Koordinator, Stv. Amtschef

Kanton Solothurn
Bau- und Justizdepartement
Amt für Geoinformation
SO!GIS Koordination
Rötistrasse 4
CH-4501 Solothurn

Telefon ++41(0)32 627 25 32
Telefax ++41(0)32 627 22 14

mailto:horst.duester at bd.so.ch
http://www.agi.so.ch



-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080423/b216024b/attachment.html>


More information about the postgis-users mailing list