<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 9.00.8112.16443"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=466182800-14052012><FONT color=#0000ff 
size=2 face=Arial>Brian,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=466182800-14052012><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=466182800-14052012><FONT color=#0000ff 
size=2 face=Arial>I guess I should ask first what were you expecting to 
happen?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=466182800-14052012><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=466182800-14052012><FONT color=#0000ff 
size=2 face=Arial>The concave hull always returns a single polygon.  It 
should never return a multipolygon.  So given that constraint, I don't see 
how it could avoid splitting the edge of your example.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=466182800-14052012><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=466182800-14052012><FONT color=#0000ff 
size=2 face=Arial>Note the union of your polygon is a 
multipolygon</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=466182800-14052012><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=466182800-14052012><FONT color=#0000ff 
size=2 face=Arial>SELECT ST_Astext(ST_Union('POLYGON((13 0,13 20,23 20,23 0, 13 
0))'::geometry, 'POLYGON((23 20, 23 28, 30 28,30 20, 23 
20))'::geometry));</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=466182800-14052012><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=466182800-14052012><FONT color=#0000ff 
size=2 face=Arial>That said any collection of polygons when unioned that does 
not result in a single polygon will have edges split when forming the concave 
hull.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=466182800-14052012><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN><SPAN class=466182800-14052012><FONT 
color=#0000ff size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=466182800-14052012><FONT color=#0000ff 
size=2 face=Arial>Hope that helps,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=466182800-14052012><FONT color=#0000ff 
size=2 face=Arial>Regina</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=466182800-14052012><FONT color=#0000ff 
size=2 face=Arial><A 
href="http://www.postgis.us">http://www.postgis.us</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=466182800-14052012><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=466182800-14052012><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV><BR>
<BLOCKQUOTE 
style="BORDER-LEFT: #0000ff 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px" 
dir=ltr>
  <DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
  <HR tabIndex=-1>
  <FONT size=2 face=Tahoma><B>From:</B> 
  postgis-users-bounces@postgis.refractions.net 
  [mailto:postgis-users-bounces@postgis.refractions.net] <B>On Behalf Of 
  </B>Brian Sanjeewa Rupasinghe<BR><B>Sent:</B> Sunday, May 13, 2012 2:27 
  PM<BR><B>To:</B> postgis-users@postgis.refractions.net<BR><B>Subject:</B> 
  [postgis-users] ConcaveHull generation<BR></FONT><BR></DIV>
  <DIV></DIV>Hi,
  <DIV><BR></DIV>
  <DIV>I have two polygons with following coordinates:</DIV>
  <DIV><BR></DIV>
  <DIV>poly1: (13,0 13,20 23,20 23,0 13,0)</DIV>
  <DIV><BR></DIV>
  <DIV>poly 2: (23,20 23,28 30,28 30,20 23,20)</DIV>
  <DIV><BR></DIV>
  <DIV>Once generated concaveHull, i end up with the polygon having following 
  coordinates:</DIV>
  <DIV><BR></DIV>
  <DIV>
  <P class=MsoNormal>"POLYGON((13 3e-016,13 5.64256204109163,13 
  11.2851240821833,13 16.9276861232749,13 20,17.4061007032357 20,23 
  27.049761125177,23 28,28.6425620410916 28,30 28,30 22.3574379589084,30 20,23 
  14.674220666202,23 9.34844133240395,23 4.02266199860593,23 
  3e-016,17.3574379589084 3e-016,13 3e-016))"</P>
  <P class=MsoNormal><BR></P>
  <P class=MsoNormal>When investigating the coordinate list, it is observed that 
  some existing edges are split. [Eg. edge connecting 13,0 and 13,20]. Why is 
  taht?</P>
  <P class=MsoNormal><BR></P>
  <P class=MsoNormal>Here is the SQL code i used</P>
  <P class=MsoNormal><BR></P>
  <P class=MsoNormal></P>
  <P class=MsoNormal>SELECT ST_AsText 
  (ST_cleangeometry((ST_ConcaveHull(ST_Collect(geom), 0.99))))</P>
  <P class=MsoNormal>FROM concavepoly</P>
  <P class=MsoNormal>WHERE cluster_id = 'VC-2';</P>
  <P class=MsoNormal><BR></P>
  <P class=MsoNormal>Cheers, Brian</P>
  <P></P></DIV></BLOCKQUOTE></BODY></HTML>