<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html lang="en">
<head><meta http-equiv="Content-Type" content="text/html;">
<title>Scalix message content</title>
<style type="text/css">
<!--
.Normal {  text-align: left; text-indent:0pt; margin-top:0pt; margin-bottom:0pt; font-family: Arial; font-size: 12pt; }
.Default_Paragraph_Font {font-family: Arial; color: Black; background-color: white ; font-size: 12pt; font-weight: normal;  font-style: normal; font-variant: normal; vertical-align: normal; text-decoration: none;}
div.ltTOCtitle { font-family: Verdana; font-size: 8pt; font-weight: bold; text-align: center;}
div.ltTOCl1 { font-family: Verdana; font-size: 8pt; font-weight: bold; margin-left:32pt; text-indent:-32pt;}
div.ltTOCl2 { font-family: Verdana; font-size: 8pt; font-weight: bold; margin-left:40pt; text-indent:-32pt;}
div.ltTOCl3 {  font-family: Verdana; font-size: 8pt; font-weight: bold; margin-left:48pt; text-indent:-32pt;}
div.ltTOCl4 { font-family: Verdana; font-size: 8pt; font-weight: bold; margin-left:56pt; text-indent:-32pt;}
div.ltTOCl5 { font-family: Verdana; font-size: 8pt; font-weight: bold; margin-left:64pt; text-indent:-32pt;}
div.ltTOCl6 { font-family: Verdana; font-size: 8pt; font-weight: bold; margin-left:72pt; text-indent:-32pt;}
-->
</style>
</head>

<body>
<div class="Normal"><span style='font-size: 10pt; '>Stephen</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>&gt;and see if you get a
multipolygon ot a collection as the result.</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>A collection is the result
of course. The mix of two geometry types is the one reason, but your idea leeds
also to a collection because your idea tries to collect two multigeometries. I
believe it is not possible to merge multipolygons into one multipolygon like
MULTIPOLYGON(MULTIPOLYGON1, MULTIPOLYGON2,...). This geometry has to be a
collection. </span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>Horst</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>------------------------------------------------</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>Dr. Horst
D&uuml;ster</span><br><span style='font-size: 10pt; '>GIS-Koordinator, Stv.
Amtschef</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>Kanton
Solothurn</span><br><span style='font-size: 10pt; '>Bau- und
Justizdepartement</span><br><span style='font-size: 10pt; '>Amt f&uuml;r
Geoinformation</span><br><span style='font-size: 10pt; '>SO!GIS
Koordination</span><br><span style='font-size: 10pt; '>R&ouml;tistrasse
4</span><br><span style='font-size: 10pt; '>CH-4501 Solothurn</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>Telefon ++41(0)32 627 25
32</span><br><span style='font-size: 10pt; '>Telefax ++41(0)32 627 22
14</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>mailto:horst.duester@bd.so.ch</span><br><span style='font-size: 10pt; '>http://www.agi.so.ch</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>-----Urspr&uuml;ngliche
Nachricht-----</span><br><span style='font-size: 10pt; '>Von: Stephen Woodbridge
[mailto:woodbri@swoodbridge.com]</span><br><span style='font-size: 10pt; '>Gesendet
am: Mittwoch, 23. April 2008 17:59</span><br><span style='font-size: 10pt; '>An:
PostGIS Users Discussion</span><br><span style='font-size: 10pt; '>Betreff: Re:
AW: RE: [postgis-users] Geometrycollection to Multipolygon</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>I think you are getting the
collection because you are mixing
types.</span><br><span style='font-size: 10pt; '>Try this (I haven't tried
it):</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>st_collect(</span><br><span style='font-size: 10pt; '>
st_collect(st_multi(polygon1),
st_multi(polygon2)),</span><br><span style='font-size: 10pt; '>  
st_multi(polygon3))</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>and see if you get a
multipolygon ot a collection as the result.</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>-Steve W</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>D&uuml;ster Horst
wrote:</span><br><span style='font-size: 10pt; '>&gt;
</span><br><span style='font-size: 10pt; '>&gt;
Regina</span><br><span style='font-size: 10pt; '>&gt; 
</span><br><span style='font-size: 10pt; '>&gt; Thank you for your response.
Mmmm.. your trick doesn't solve my problem.
</span><br><span style='font-size: 10pt; '>&gt; Perhaps I should tell you why I
do have a geometrycollection. My </span><br><span style='font-size: 10pt; '>&gt;
startingpoint is a sequence of single polygons. My aim is to merge them
</span><br><span style='font-size: 10pt; '>&gt; together to one multipolygon. I
do this with st_collect. This works fine
</span><br><span style='font-size: 10pt; '>&gt; with two
polygons:</span><br><span style='font-size: 10pt; '>&gt; 
</span><br><span style='font-size: 10pt; '>&gt; st_collect(polygon1,polygon2)
=&gt; multipolygon(1,2).</span><br><span style='font-size: 10pt; '>&gt; 
</span><br><span style='font-size: 10pt; '>&gt; When I Process the third polygon
with: st_collect(multipolygon(1,2),
</span><br><span style='font-size: 10pt; '>&gt; polygon3)  =&gt;
Geometrycollection(multipolygon(1,2),polygon3)</span><br><span style='font-size: 10pt; '>&gt;
</span><br><span style='font-size: 10pt; '>&gt; I do get the geomtrycollection
and so on.</span><br><span style='font-size: 10pt; '>&gt; 
</span><br><span style='font-size: 10pt; '>&gt; My main problem is to merge the
three polygons into one multipolygon
</span><br><span style='font-size: 10pt; '>&gt; with 3
geometries.</span><br><span style='font-size: 10pt; '>&gt; 
</span><br><span style='font-size: 10pt; '>&gt; When I solve this problem I can
offer a procedure to clean invalid
</span><br><span style='font-size: 10pt; '>&gt;
geometries.</span><br><span style='font-size: 10pt; '>&gt; 
</span><br><span style='font-size: 10pt; '>&gt;
Regards</span><br><span style='font-size: 10pt; '>&gt;
Horst</span><br><span style='font-size: 10pt; '>&gt; 
</span><br><span style='font-size: 10pt; '>&gt;
</span><br><span style='font-size: 10pt; '>&gt;
------------------------------------------------</span><br><span style='font-size: 10pt; '>&gt;
</span><br><span style='font-size: 10pt; '>&gt; Dr. Horst
D&uuml;ster</span><br><span style='font-size: 10pt; '>&gt; GIS-Koordinator, Stv.
Amtschef</span><br><span style='font-size: 10pt; '>&gt;
</span><br><span style='font-size: 10pt; '>&gt; Kanton
Solothurn</span><br><span style='font-size: 10pt; '>&gt; Bau- und
Justizdepartement</span><br><span style='font-size: 10pt; '>&gt; Amt f&uuml;r
Geoinformation</span><br><span style='font-size: 10pt; '>&gt; SO!GIS
Koordination</span><br><span style='font-size: 10pt; '>&gt; R&ouml;tistrasse
4</span><br><span style='font-size: 10pt; '>&gt; CH-4501
Solothurn</span><br><span style='font-size: 10pt; '>&gt;
</span><br><span style='font-size: 10pt; '>&gt; Telefon ++41(0)32 627 25
32</span><br><span style='font-size: 10pt; '>&gt; Telefax ++41(0)32 627 22
14</span><br><span style='font-size: 10pt; '>&gt;
</span><br><span style='font-size: 10pt; '>&gt;
mailto:horst.duester@bd.so.ch</span><br><span style='font-size: 10pt; '>&gt;
http://www.agi.so.ch
&lt;http://www.agi.so.ch/&gt;</span><br><span style='font-size: 10pt; '>&gt;
</span><br><span style='font-size: 10pt; '>&gt; 
</span><br><span style='font-size: 10pt; '>&gt;
</span><br><span style='font-size: 10pt; '>&gt;     -----Urspr&uuml;ngliche
Nachricht-----</span><br><span style='font-size: 10pt; '>&gt;     *Von:* Obe,
Regina
[mailto:robe.dnd@cityofboston.gov]</span><br><span style='font-size: 10pt; '>&gt;
*Gesendet am:* Mittwoch, 23. April 2008
14:24</span><br><span style='font-size: 10pt; '>&gt;     *An:* PostGIS Users
Discussion</span><br><span style='font-size: 10pt; '>&gt;     *Betreff:* RE:
[postgis-users] Geometrycollection to
Multipolygon</span><br><span style='font-size: 10pt; '>&gt;
</span><br><span style='font-size: 10pt; '>&gt;     This sometimes does the
trick for me if they actually can be
unioned</span><br><span style='font-size: 10pt; '>&gt;     
</span><br><span style='font-size: 10pt; '>&gt;      ST_Union(GEOMCOLL,
ST_GeomFromText('GEOMETRYCOLLECTION(EMPTY)',</span><br><span style='font-size: 10pt; '>&gt;
yoursridhere) )</span><br><span style='font-size: 10pt; '>&gt;     
</span><br><span style='font-size: 10pt; '>&gt;     (your number 2 doesn't work
because that is the aggregate form,
not</span><br><span style='font-size: 10pt; '>&gt;     because ST_Union can't
handle geometry collections I
think)</span><br><span style='font-size: 10pt; '>&gt;     
</span><br><span style='font-size: 10pt; '>&gt;     
</span><br><span style='font-size: 10pt; '>&gt;     Hope that
helps,</span><br><span style='font-size: 10pt; '>&gt;    
Regina</span><br><span style='font-size: 10pt; '>&gt;        *From:*
postgis-users-bounces@postgis.refractions.net</span><br><span style='font-size: 10pt; '>&gt;
[mailto:postgis-users-bounces@postgis.refractions.net] *On Behalf
Of</span><br><span style='font-size: 10pt; '>&gt;     *D&uuml;ster
Horst</span><br><span style='font-size: 10pt; '>&gt;     *Sent:* Wednesday,
April 23, 2008 2:25 AM</span><br><span style='font-size: 10pt; '>&gt;     *To:*
postgis-users</span><br><span style='font-size: 10pt; '>&gt;     *Subject:*
[postgis-users] Geometrycollection to
Multipolygon</span><br><span style='font-size: 10pt; '>&gt;
</span><br><span style='font-size: 10pt; '>&gt;     I do have a
Geometrycollection which consists of a collection
of</span><br><span style='font-size: 10pt; '>&gt;     Multipolygons and
Polygons. My aim is to create one
single</span><br><span style='font-size: 10pt; '>&gt;     Multipolygon from the
mentioned Geometry collection.</span><br><span style='font-size: 10pt; '>&gt;
</span><br><span style='font-size: 10pt; '>&gt;     Until now I tried the
following steps without result:</span><br><span style='font-size: 10pt; '>&gt;
</span><br><span style='font-size: 10pt; '>&gt;     1. ST_BUFFER(GEOMCOLL,0.0)
=&gt; It works but all inner rings of
my</span><br><span style='font-size: 10pt; '>&gt;     input geometry are
lost.</span><br><span style='font-size: 10pt; '>&gt;     2. ST_UNION(GEOMCOLL)
=&gt; doesn't work with
Geometrycollections</span><br><span style='font-size: 10pt; '>&gt;
</span><br><span style='font-size: 10pt; '>&gt;     Does anyone has a solution
to solve my problem?</span><br><span style='font-size: 10pt; '>&gt;
</span><br><span style='font-size: 10pt; '>&gt;     Best
regards</span><br><span style='font-size: 10pt; '>&gt;    
Horst</span><br><span style='font-size: 10pt; '>&gt;
</span><br><span style='font-size: 10pt; '>&gt;    
------------------------------------------------</span><br><span style='font-size: 10pt; '>&gt;
</span><br><span style='font-size: 10pt; '>&gt;     Dr. Horst
D&uuml;ster</span><br><span style='font-size: 10pt; '>&gt;     GIS-Koordinator,
Stv. Amtschef</span><br><span style='font-size: 10pt; '>&gt;
</span><br><span style='font-size: 10pt; '>&gt;     Kanton
Solothurn</span><br><span style='font-size: 10pt; '>&gt;     Bau- und
Justizdepartement</span><br><span style='font-size: 10pt; '>&gt;     Amt
f&uuml;r Geoinformation</span><br><span style='font-size: 10pt; '>&gt;    
SO!GIS Koordination</span><br><span style='font-size: 10pt; '>&gt;    
R&ouml;tistrasse 4</span><br><span style='font-size: 10pt; '>&gt;     CH-4501
Solothurn</span><br><span style='font-size: 10pt; '>&gt;
</span><br><span style='font-size: 10pt; '>&gt;     Telefon ++41(0)32 627 25
32</span><br><span style='font-size: 10pt; '>&gt;     Telefax ++41(0)32 627 22
14</span><br><span style='font-size: 10pt; '>&gt;
</span><br><span style='font-size: 10pt; '>&gt;    
mailto:horst.duester@bd.so.ch</span><br><span style='font-size: 10pt; '>&gt;    
http://www.agi.so.ch</span><br><span style='font-size: 10pt; '>&gt;
</span><br><span style='font-size: 10pt; '>&gt;      
</span><br><span style='font-size: 10pt; '>&gt;
</span><br><span style='font-size: 10pt; '>&gt;     *The substance of this
message, including any attachments, may
be</span><br><span style='font-size: 10pt; '>&gt;     confidential, legally
privileged and/or exempt from
disclosure</span><br><span style='font-size: 10pt; '>&gt;     pursuant to
Massachusetts law. It is intended solely for
the</span><br><span style='font-size: 10pt; '>&gt;     addressee. If you
received this in error, please contact the
sender</span><br><span style='font-size: 10pt; '>&gt;     and delete the
material from any computer. *</span><br><span style='font-size: 10pt; '>&gt;
</span><br><span style='font-size: 10pt; '>&gt;      
</span><br><span style='font-size: 10pt; '>&gt;
</span><br><span style='font-size: 10pt; '>&gt;     * Help make the earth a
greener place. If at all possible
resist</span><br><span style='font-size: 10pt; '>&gt;     printing this email
and join us in saving paper. *</span><br><span style='font-size: 10pt; '>&gt;
</span><br><span style='font-size: 10pt; '>&gt;     *
*</span><br><span style='font-size: 10pt; '>&gt;
</span><br><span style='font-size: 10pt; '>&gt;
</span><br><span style='font-size: 10pt; '>&gt;
------------------------------------------------------------------------</span><br><span style='font-size: 10pt; '>&gt;
</span><br><span style='font-size: 10pt; '>&gt;
_______________________________________________</span><br><span style='font-size: 10pt; '>&gt;
postgis-users mailing list</span><br><span style='font-size: 10pt; '>&gt;
postgis-users@postgis.refractions.net</span><br><span style='font-size: 10pt; '>&gt;
http://postgis.refractions.net/mailman/listinfo/postgis-users</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>_______________________________________________</span><br><span style='font-size: 10pt; '>postgis-users
mailing
list</span><br><span style='font-size: 10pt; '>postgis-users@postgis.refractions.net</span><br><span style='font-size: 10pt; '>http://postgis.refractions.net/mailman/listinfo/postgis-users</span></div>



</body>

</html>