<!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; '>>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ü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ür
Geoinformation</span><br><span style='font-size: 10pt; '>SO!GIS
Koordination</span><br><span style='font-size: 10pt; '>Rö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ü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üster Horst
wrote:</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>>
Regina</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>> Thank you for your response.
Mmmm.. your trick doesn't solve my problem.
</span><br><span style='font-size: 10pt; '>> Perhaps I should tell you why I
do have a geometrycollection. My </span><br><span style='font-size: 10pt; '>>
startingpoint is a sequence of single polygons. My aim is to merge them
</span><br><span style='font-size: 10pt; '>> together to one multipolygon. I
do this with st_collect. This works fine
</span><br><span style='font-size: 10pt; '>> with two
polygons:</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>> st_collect(polygon1,polygon2)
=> multipolygon(1,2).</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>> When I Process the third polygon
with: st_collect(multipolygon(1,2),
</span><br><span style='font-size: 10pt; '>> polygon3) =>
Geometrycollection(multipolygon(1,2),polygon3)</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>> I do get the geomtrycollection
and so on.</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>> My main problem is to merge the
three polygons into one multipolygon
</span><br><span style='font-size: 10pt; '>> with 3
geometries.</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>> When I solve this problem I can
offer a procedure to clean invalid
</span><br><span style='font-size: 10pt; '>>
geometries.</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>>
Regards</span><br><span style='font-size: 10pt; '>>
Horst</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>>
------------------------------------------------</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>> Dr. Horst
Düster</span><br><span style='font-size: 10pt; '>> GIS-Koordinator, Stv.
Amtschef</span><br><span style='font-size: 10pt; '>>
</span><br><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ür
Geoinformation</span><br><span style='font-size: 10pt; '>> SO!GIS
Koordination</span><br><span style='font-size: 10pt; '>> Rötistrasse
4</span><br><span style='font-size: 10pt; '>> CH-4501
Solothurn</span><br><span style='font-size: 10pt; '>>
</span><br><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><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>>
mailto:horst.duester@bd.so.ch</span><br><span style='font-size: 10pt; '>>
http://www.agi.so.ch
<http://www.agi.so.ch/></span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>> -----Ursprüngliche
Nachricht-----</span><br><span style='font-size: 10pt; '>> *Von:* Obe,
Regina
[mailto:robe.dnd@cityofboston.gov]</span><br><span style='font-size: 10pt; '>>
*Gesendet am:* Mittwoch, 23. April 2008
14:24</span><br><span style='font-size: 10pt; '>> *An:* PostGIS Users
Discussion</span><br><span style='font-size: 10pt; '>> *Betreff:* RE:
[postgis-users] Geometrycollection to
Multipolygon</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>> This sometimes does the
trick for me if they actually can be
unioned</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>> ST_Union(GEOMCOLL,
ST_GeomFromText('GEOMETRYCOLLECTION(EMPTY)',</span><br><span style='font-size: 10pt; '>>
yoursridhere) )</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>> (your number 2 doesn't work
because that is the aggregate form,
not</span><br><span style='font-size: 10pt; '>> because ST_Union can't
handle geometry collections I
think)</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>> Hope that
helps,</span><br><span style='font-size: 10pt; '>>
Regina</span><br><span style='font-size: 10pt; '>> *From:*
postgis-users-bounces@postgis.refractions.net</span><br><span style='font-size: 10pt; '>>
[mailto:postgis-users-bounces@postgis.refractions.net] *On Behalf
Of</span><br><span style='font-size: 10pt; '>> *Düster
Horst</span><br><span style='font-size: 10pt; '>> *Sent:* Wednesday,
April 23, 2008 2:25 AM</span><br><span style='font-size: 10pt; '>> *To:*
postgis-users</span><br><span style='font-size: 10pt; '>> *Subject:*
[postgis-users] Geometrycollection to
Multipolygon</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>> I do have a
Geometrycollection which consists of a collection
of</span><br><span style='font-size: 10pt; '>> Multipolygons and
Polygons. My aim is to create one
single</span><br><span style='font-size: 10pt; '>> Multipolygon from the
mentioned Geometry collection.</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>> Until now I tried the
following steps without result:</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>> 1. ST_BUFFER(GEOMCOLL,0.0)
=> It works but all inner rings of
my</span><br><span style='font-size: 10pt; '>> input geometry are
lost.</span><br><span style='font-size: 10pt; '>> 2. ST_UNION(GEOMCOLL)
=> doesn't work with
Geometrycollections</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>> Does anyone has a solution
to solve my problem?</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>> Best
regards</span><br><span style='font-size: 10pt; '>>
Horst</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>>
------------------------------------------------</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>> Dr. Horst
Düster</span><br><span style='font-size: 10pt; '>> GIS-Koordinator,
Stv. Amtschef</span><br><span style='font-size: 10pt; '>>
</span><br><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ür Geoinformation</span><br><span style='font-size: 10pt; '>>
SO!GIS Koordination</span><br><span style='font-size: 10pt; '>>
Rötistrasse 4</span><br><span style='font-size: 10pt; '>> CH-4501
Solothurn</span><br><span style='font-size: 10pt; '>>
</span><br><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><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>>
mailto:horst.duester@bd.so.ch</span><br><span style='font-size: 10pt; '>>
http://www.agi.so.ch</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>> *The substance of this
message, including any attachments, may
be</span><br><span style='font-size: 10pt; '>> confidential, legally
privileged and/or exempt from
disclosure</span><br><span style='font-size: 10pt; '>> pursuant to
Massachusetts law. It is intended solely for
the</span><br><span style='font-size: 10pt; '>> addressee. If you
received this in error, please contact the
sender</span><br><span style='font-size: 10pt; '>> and delete the
material from any computer. *</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>> * Help make the earth a
greener place. If at all possible
resist</span><br><span style='font-size: 10pt; '>> printing this email
and join us in saving paper. *</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>> *
*</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>>
------------------------------------------------------------------------</span><br><span style='font-size: 10pt; '>>
</span><br><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>
<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>