<!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.16434"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=124521706-14092011><FONT color=#0000ff 
size=2 face=Arial>Actually if I compensate for the fact the data is imperfect to 
begin with, things look much better.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=124521706-14092011><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=124521706-14092011> 
<DIV style="tab-interval: .5in" class=O v:shape="_x0000_s1026">
<DIV style="mso-line-spacing: '73 0 0'; mso-margin-left-alt: 216"><SPAN 
style="FONT-FAMILY: 'Courier New'; COLOR: black; mso-ascii-font-family: 'Courier New'; mso-fareast-font-family: 'Arial Unicode MS'; mso-hansi-font-family: 'Courier New'">UPDATE 
boston.nei </SPAN></DIV>
<DIV style="mso-line-spacing: '73 0 0'; mso-margin-left-alt: 216"><SPAN 
style="FONT-FAMILY: 'Courier New'; COLOR: black; mso-ascii-font-family: 'Courier New'; mso-fareast-font-family: 'Arial Unicode MS'; mso-hansi-font-family: 'Courier New'"><SPAN 
style="WIDTH: 3.63%; mso-tab-count: 1"></SPAN>SET topo = </SPAN></DIV>
<DIV style="mso-line-spacing: '73 0 0'; mso-margin-left-alt: 216"><SPAN 
style="FONT-FAMILY: 'Courier New'; COLOR: black; mso-ascii-font-family: 'Courier New'; mso-fareast-font-family: 'Arial Unicode MS'; mso-hansi-font-family: 'Courier New'"><SPAN 
style="mso-spacerun: yes">    
</SPAN>topology.CreateTopoGeom('topo_boston' </SPAN></DIV>
<DIV style="mso-line-spacing: '73 0 0'; mso-margin-left-alt: 216"><SPAN 
style="FONT-FAMILY: 'Courier New'; COLOR: black; mso-ascii-font-family: 'Courier New'; mso-fareast-font-family: 'Arial Unicode MS'; mso-hansi-font-family: 'Courier New'"><SPAN 
style="mso-spacerun: yes">        </SPAN>,3,6 
</SPAN></DIV>
<DIV style="mso-line-spacing: '73 0 0'; mso-margin-left-alt: 216"><SPAN 
style="FONT-FAMILY: 'Courier New'; COLOR: black; mso-ascii-font-family: 'Courier New'; mso-fareast-font-family: 'Arial Unicode MS'; mso-hansi-font-family: 'Courier New'"><SPAN 
style="mso-spacerun: yes">        </SPAN>, 
foo.bedges) </SPAN></DIV>
<DIV style="mso-line-spacing: '73 0 0'; mso-margin-left-alt: 216"><SPAN 
style="FONT-FAMILY: 'Courier New'; COLOR: black; mso-ascii-font-family: 'Courier New'; mso-fareast-font-family: 'Arial Unicode MS'; mso-hansi-font-family: 'Courier New'"></SPAN></DIV>
<DIV style="mso-line-spacing: '73 0 0'; mso-margin-left-alt: 216"><SPAN 
style="FONT-FAMILY: 'Courier New'; COLOR: black; mso-ascii-font-family: 'Courier New'; mso-fareast-font-family: 'Arial Unicode MS'; mso-hansi-font-family: 'Courier New'">FROM 
(SELECT n.gid,<SPAN style="mso-spacerun: yes">  
</SPAN>topology.TopoElementArray_Agg(DISTINCT </SPAN><SPAN 
style="FONT-FAMILY: 'Courier New'; COLOR: black; mso-ascii-font-family: 'Courier New'; mso-fareast-font-family: 'Arial Unicode MS'; mso-hansi-font-family: 'Courier New'">ARRAY[f.face_id,3]) 
As bedges </SPAN></DIV>
<DIV style="mso-line-spacing: '73 0 0'; mso-margin-left-alt: 216"><SPAN 
style="FONT-FAMILY: 'Courier New'; COLOR: black; mso-ascii-font-family: 'Courier New'; mso-fareast-font-family: 'Arial Unicode MS'; mso-hansi-font-family: 'Courier New'"><SPAN 
style="WIDTH: 3.63%; mso-tab-count: 1"></SPAN>FROM boston.nei As n </SPAN></DIV>
<DIV style="mso-line-spacing: '73 0 0'; mso-margin-left-alt: 216"><SPAN 
style="FONT-FAMILY: 'Courier New'; COLOR: black; mso-ascii-font-family: 'Courier New'; mso-fareast-font-family: 'Arial Unicode MS'; mso-hansi-font-family: 'Courier New'"><SPAN 
style="mso-spacerun: yes">            
</SPAN>INNER JOIN topo_boston.face As f ON n.geom && f.mbr </SPAN></DIV>
<DIV style="mso-line-spacing: '73 0 0'; mso-margin-left-alt: 216"><SPAN 
style="FONT-FAMILY: 'Courier New'; COLOR: black; mso-ascii-font-family: 'Courier New'; mso-fareast-font-family: 'Arial Unicode MS'; mso-hansi-font-family: 'Courier New'"><SPAN 
style="mso-spacerun: yes">        
</SPAN>WHERE </SPAN></DIV>
<DIV style="mso-line-spacing: '73 0 0'; mso-margin-left-alt: 216"><SPAN 
style="FONT-FAMILY: 'Courier New'; COLOR: black; mso-ascii-font-family: 'Courier New'; mso-fareast-font-family: 'Arial Unicode MS'; mso-hansi-font-family: 'Courier New'"><SPAN 
style="mso-spacerun: yes">       
</SPAN>ST_Covers(n.geom, topology.ST_GetFaceGeometry('topo_boston', </SPAN><SPAN 
style="FONT-FAMILY: 'Courier New'; COLOR: black; mso-ascii-font-family: 'Courier New'; mso-fareast-font-family: 'Arial Unicode MS'; mso-hansi-font-family: 'Courier New'">f.face_id)) 
</SPAN></DIV>
<DIV style="mso-line-spacing: '73 0 0'; mso-margin-left-alt: 216"><SPAN 
style="FONT-FAMILY: 'Courier New'; COLOR: black; mso-ascii-font-family: 'Courier New'; mso-fareast-font-family: 'Arial Unicode MS'; mso-hansi-font-family: 'Courier New'"><SPAN 
style="mso-spacerun: yes">        </SPAN>OR 
</SPAN></DIV>
<DIV style="mso-line-spacing: '73 0 0'; mso-margin-left-alt: 216"><SPAN 
style="FONT-FAMILY: 'Courier New'; COLOR: black; mso-ascii-font-family: 'Courier New'; mso-fareast-font-family: 'Arial Unicode MS'; mso-hansi-font-family: 'Courier New'"><SPAN 
style="mso-spacerun: yes">      </SPAN>(<SPAN 
style="mso-spacerun: yes">  </SPAN>ST_Intersects(n.geom, </SPAN><SPAN 
style="FONT-FAMILY: 'Courier New'; COLOR: black; mso-ascii-font-family: 'Courier New'; mso-fareast-font-family: 'Arial Unicode MS'; mso-hansi-font-family: 'Courier New'">topology.ST_GetFaceGeometry('topo_boston', 
f.face_id)) </SPAN></DIV>
<DIV style="mso-line-spacing: '73 0 0'; mso-margin-left-alt: 216"><SPAN 
style="FONT-FAMILY: 'Courier New'; COLOR: black; mso-ascii-font-family: 'Courier New'; mso-fareast-font-family: 'Arial Unicode MS'; mso-hansi-font-family: 'Courier New'"><SPAN 
style="mso-spacerun: yes">            
</SPAN>AND ST_Area(ST_Intersection(n.geom, </SPAN><SPAN 
style="FONT-FAMILY: 'Courier New'; COLOR: black; mso-ascii-font-family: 'Courier New'; mso-fareast-font-family: 'Arial Unicode MS'; mso-hansi-font-family: 'Courier New'">topology.ST_GetFaceGeometry('topo_boston', 
f.face_id) ) ) > </SPAN></DIV>
<DIV style="mso-line-spacing: '73 0 0'; mso-margin-left-alt: 216"><SPAN 
style="FONT-FAMILY: 'Courier New'; COLOR: black; mso-ascii-font-family: 'Courier New'; mso-fareast-font-family: 'Arial Unicode MS'; mso-hansi-font-family: 'Courier New'"><SPAN 
style="mso-spacerun: yes">                
</SPAN>ST_Area(topology.ST_GetFaceGeometry('topo_boston', </SPAN><SPAN 
style="FONT-FAMILY: 'Courier New'; COLOR: black; mso-ascii-font-family: 'Courier New'; mso-fareast-font-family: 'Arial Unicode MS'; mso-hansi-font-family: 'Courier New'">f.face_id))*0.6) 
</SPAN></DIV>
<DIV style="mso-line-spacing: '73 0 0'; mso-margin-left-alt: 216"><SPAN 
style="FONT-FAMILY: 'Courier New'; COLOR: black; mso-ascii-font-family: 'Courier New'; mso-fareast-font-family: 'Arial Unicode MS'; mso-hansi-font-family: 'Courier New'"><SPAN 
style="mso-spacerun: yes">            
</SPAN>GROUP BY n.gid) As foo </SPAN></DIV>
<DIV style="mso-line-spacing: '73 0 0'; mso-margin-left-alt: 216"><SPAN 
style="FONT-FAMILY: 'Courier New'; COLOR: black; mso-ascii-font-family: 'Courier New'; mso-fareast-font-family: 'Arial Unicode MS'; mso-hansi-font-family: 'Courier New'">WHERE 
foo.gid = boston.nei.gid; </SPAN></DIV>
<DIV style="mso-line-spacing: '73 0 0'; mso-margin-left-alt: 216"><SPAN 
style="FONT-FAMILY: 'Courier New'; COLOR: black; mso-ascii-font-family: 'Courier New'; mso-fareast-font-family: 'Arial Unicode MS'; mso-hansi-font-family: 'Courier New'"></SPAN> </DIV>
<DIV style="mso-line-spacing: '73 0 0'; mso-margin-left-alt: 216"><SPAN 
style="FONT-FAMILY: 'Courier New'; COLOR: black; mso-ascii-font-family: 'Courier New'; mso-fareast-font-family: 'Arial Unicode MS'; mso-hansi-font-family: 'Courier New'"><SPAN 
class=124521706-14092011><FONT face=Arial>It still would be nice though to have 
choice to form from polygons from edges instead of just 
faces.</FONT></SPAN></SPAN></DIV>
<DIV style="mso-line-spacing: '73 0 0'; mso-margin-left-alt: 216"><SPAN 
style="FONT-FAMILY: 'Courier New'; COLOR: black; mso-ascii-font-family: 'Courier New'; mso-fareast-font-family: 'Arial Unicode MS'; mso-hansi-font-family: 'Courier New'"><SPAN 
class=124521706-14092011></SPAN></SPAN> </DIV>
<DIV style="mso-line-spacing: '73 0 0'; mso-margin-left-alt: 216"><SPAN 
style="FONT-FAMILY: 'Courier New'; COLOR: black; mso-ascii-font-family: 'Courier New'; mso-fareast-font-family: 'Arial Unicode MS'; mso-hansi-font-family: 'Courier New'"><SPAN 
class=124521706-14092011>Thanks,</SPAN></SPAN></DIV>
<DIV style="mso-line-spacing: '73 0 0'; mso-margin-left-alt: 216"><SPAN 
style="FONT-FAMILY: 'Courier New'; COLOR: black; mso-ascii-font-family: 'Courier New'; mso-fareast-font-family: 'Arial Unicode MS'; mso-hansi-font-family: 'Courier New'"><SPAN 
class=124521706-14092011>Regina</SPAN></SPAN></DIV>
<DIV 
style="TEXT-ALIGN: center; mso-line-spacing: '93 50 0'; mso-margin-left-alt: 216; mso-char-wrap: 1"><FONT 
color=#0000ff size=2 face=Arial></FONT> </DIV>
<DIV 
style="TEXT-ALIGN: center; mso-line-spacing: '93 50 0'; mso-margin-left-alt: 216; mso-char-wrap: 1"><FONT 
color=#0000ff size=2 face=Arial></FONT> </DIV></DIV></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-devel-bounces@postgis.refractions.net 
  [mailto:postgis-devel-bounces@postgis.refractions.net] <B>On Behalf Of 
  </B>Paragon Corporation<BR><B>Sent:</B> Wednesday, September 14, 2011 12:18 
  AM<BR><B>To:</B> 'PostGIS Development Discussion'<BR><B>Cc:</B> 'PostGIS Users 
  Discussion'<BR><B>Subject:</B> [postgis-devel] CreateTopoGeom -- why can't 
  create polygon topofrom edges<BR></FONT><BR></DIV>
  <DIV></DIV>
  <DIV><SPAN class=744530504-14092011><FONT size=2 face=Arial>strk and 
  Andrea,</FONT></SPAN></DIV>
  <DIV><SPAN class=744530504-14092011><FONT size=2 
  face=Arial></FONT></SPAN> </DIV>
  <DIV><SPAN class=744530504-14092011><FONT size=2 face=Arial>Perhaps this is 
  just illegal by specs, but I'm wondering why I couldn't logically create a 
  multi/poly topogeometry from edges that form the boundary of a polygon? or do 
  the specs just not</FONT></SPAN></DIV>
  <DIV><SPAN class=744530504-14092011><FONT size=2 face=Arial>allow that.  
  I see the CreateTopoGeom just throws an error if I dear try to create a 
  polygon from edges.</FONT></SPAN></DIV>
  <DIV><SPAN class=744530504-14092011><FONT size=2 
  face=Arial></FONT></SPAN> </DIV>
  <DIV><SPAN class=744530504-14092011><FONT size=2 face=Arial>I was trying to 
  take my neighborhoods table and convert my geometries to topo geoms.  So 
  I used this update statement.  That's a lot of faces though.  I 
  think it would be</FONT></SPAN></DIV>
  <DIV><SPAN class=744530504-14092011><FONT size=2 face=Arial>much faster if I 
  could have built from the edges of the boundaries.</FONT></SPAN></DIV>
  <DIV><SPAN class=744530504-14092011><FONT size=2 
  face=Arial></FONT></SPAN> </DIV>
  <DIV><SPAN class=744530504-14092011><FONT size=2 face=Arial>UPDATE 
  boston.nei<BR> SET topo = <BR>    
  topology.CreateTopoGeom('topo_boston'<BR>        
  ,3,6<BR>        , 
  foo.bedges)</FONT></SPAN></DIV>
  <DIV><SPAN class=744530504-14092011><FONT size=2 face=Arial>FROM (SELECT 
  n.gid,  topology.TopoElementArray_Agg(DISTINCT ARRAY[f.face_id,3]) As 
  bedges<BR> FROM boston.nei As 
  n<BR>            INNER 
  JOIN topo_boston.face As f ON n.geom && 
  f.mbr<BR>        WHERE ST_Covers(n.geom, 
  topology.ST_GetFaceGeometry('topo_boston', 
  f.face_id))<BR>            
  GROUP BY n.gid) As foo<BR>WHERE foo.gid = boston.nei.gid;</FONT></SPAN></DIV>
  <DIV><SPAN class=744530504-14092011><FONT size=2 
  face=Arial></FONT></SPAN> </DIV>
  <DIV><SPAN class=744530504-14092011><FONT size=2 face=Arial>It's also not 
  quite what I hoped for but that could be because I'm still missing faces or 
  tiger doesn't care about Boston neighborhoods which is quite possible or who 
  ever drew the maps idea of streets are not aligned with those of tiger.  
  See attached images -- my original geometry and the topo 
  column</FONT></SPAN></DIV>
  <DIV><SPAN class=744530504-14092011><FONT size=2 face=Arial>generated from 
  it.</FONT></SPAN></DIV>
  <DIV><SPAN class=744530504-14092011><FONT size=2 
  face=Arial></FONT></SPAN> </DIV>
  <DIV><SPAN class=744530504-14092011><FONT size=2 face=Arial>Boston 
  neighborhoods are kind of dumb since no one can agree on the boundaries and 
  people get into fist fights about it.  I think the same case in 
  Philadelphia.</FONT></SPAN></DIV>
  <DIV><SPAN class=744530504-14092011><FONT size=2 
  face=Arial></FONT></SPAN> </DIV>
  <DIV><SPAN class=744530504-14092011><FONT size=2 
  face=Arial></FONT></SPAN> </DIV>
  <DIV><SPAN class=744530504-14092011><FONT size=2 
  face=Arial>Thanks,</FONT></SPAN></DIV>
  <DIV><SPAN class=744530504-14092011><FONT size=2 
  face=Arial>Regina</FONT></SPAN></DIV>
  <DIV><SPAN class=744530504-14092011><FONT size=2 
  face=Arial></FONT></SPAN> </DIV>
  <DIV><SPAN class=744530504-14092011><FONT size=2 
  face=Arial></FONT></SPAN> </DIV>
  <DIV><SPAN class=744530504-14092011><FONT size=2 
  face=Arial></FONT></SPAN> </DIV>
  <DIV><SPAN class=744530504-14092011><FONT size=2 
  face=Arial></FONT></SPAN> </DIV>
  <DIV><SPAN 
class=744530504-14092011></SPAN> </DIV></BLOCKQUOTE></BODY></HTML>