<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16481" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=172070812-19092007><FONT face=Arial 
color=#0000ff size=2>Kevin,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=172070812-19092007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=172070812-19092007><FONT face=Arial 
color=#0000ff size=2> When was st_polygonize introduced? The docs say it 
was introduced in 1.0.0 RC1?  I see it in my newere 1.3 databases.  I 
don't see it in my 1.2.1 corrupted upgrade to 1.3.  I suspect this is 
because of the long standing issue of the bug in upgrading aggregates with soft 
upgrade and I have had a db that has existed pre 1.0 and I forget the last 
time I did a complete upgrade on it.  </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=172070812-19092007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=172070812-19092007><FONT face=Arial 
color=#0000ff size=2>Thanks,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=172070812-19092007><FONT face=Arial 
color=#0000ff size=2>Regina</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=172070812-19092007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=172070812-19092007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> 
postgis-users-bounces@postgis.refractions.net 
[mailto:postgis-users-bounces@postgis.refractions.net] <B>On Behalf Of </B>Kevin 
Neufeld<BR><B>Sent:</B> Tuesday, September 18, 2007 3:43 PM<BR><B>To:</B> 
PostGIS Users Discussion<BR><B>Subject:</B> Re: [postgis-users] 
UNION<BR></FONT><BR></DIV>
<DIV></DIV>It sounds like you are after performing an overlay operation on two 
polygonal datasets.<BR><BR>I would do something like:<BR>- extract all lines 
from your polygons<BR>- node the linework<BR>- re-polygonize the noded 
lines<BR>- transfer attributes from the original dataset to the newly formed 
polygons.<BR><BR><A class=moz-txt-link-freetext 
href="http://postgis.refractions.net/support/wiki/index.php?ExamplesOverlayTables">http://postgis.refractions.net/support/wiki/index.php?ExamplesOverlayTables</A><BR><BR>Hope 
this helps,<BR>Kevin<BR><PRE class=moz-signature cols="72">-------------
Kevin Neufeld
Software Developer
Refractions Research Inc.
300-1207 Douglas St.
Victoria, B.C., V8W 2E7

Phone: (250) 383-3022
Email: <A class=moz-txt-link-abbreviated href="mailto:kneufeld@refractions.net">kneufeld@refractions.net</A></PRE><BR><BR>RAVI 
KUMAR wrote: 
<BLOCKQUOTE cite=mid:290266.69461.qm@web60516.mail.yahoo.com 
  type="cite">Hi,<BR>a and b, are multiple tables derived from -2- shape files 
  saved as POST-GIS data.<BR>Slide 1:<BR>'a' this data as in the slide show has 
  attributes, This is a square with polygons.<BR>'b' as in the slide show is 
  made up of 2 polygons with attributes which overlap 'a'.<BR><BR>Slide 2: a and 
  b are in  UNION with the syntax below. But <SPAN 
  style="BACKGROUND-COLOR: rgb(255,255,128)">this is not the desired 
  result.</SPAN> There are polygons overlapping other polygons, one below the 
  other.<BR><BR>Slide 3:<BR>'abc' is a union of a and b,<SPAN 
  style="BACKGROUND-COLOR: rgb(255,255,128)"> with desired  result 
  </SPAN><BR><BR>My further analysis with post GIS awaits 
  HELP.<BR><BR>Cheers<BR>Ravi Kumar<BR><BR><B><I>"Obe, Regina" <A 
  class=moz-txt-link-rfc2396E 
  href="mailto:robe.dnd@cityofboston.gov"><robe.dnd@cityofboston.gov></A></I></B> 
  wrote: 
  <BLOCKQUOTE class=replbq 
  style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">
    <META content="MSHTML 6.00.6000.16481" name=GENERATOR>
    <DIV dir=ltr align=left>
    <DIV dir=ltr align=left><SPAN class=913305812-17092007><FONT face=Arial 
    color=#0000ff size=2>Ravi,</FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=913305812-17092007></SPAN> </DIV>
    <DIV dir=ltr align=left><SPAN class=913305812-17092007><FONT face=Arial 
    color=#0000ff size=2><SPAN class=947490613-17092007>Is 
    the graphic one record or multiple records?  If multiple 
    records - I'm afraid you may be asking 2 conflicting questions 
    depending on your dataset so I'm not sure there is anything that can remedy 
    that aside from treating them as two separate 
    questions.</SPAN></FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=913305812-17092007></SPAN> </DIV>
    <DIV dir=ltr align=left><SPAN class=913305812-17092007><FONT 
    face=Arial><FONT size=2><FONT color=#0000ff>I'm <SPAN 
    class=947490613-17092007>also </SPAN>afraid you are getting into territory 
    I'm<SPAN class=947490613-17092007> very </SPAN><SPAN 
    class=947490613-17092007>weak</SPAN>.  You may want to investigate use 
    of st_boundary<SPAN class=947490613-17092007> (which will give you a 
    multilinestring  of a polygon/multipolygon boundary and then apply 
    buildarea to that).</SPAN></FONT></FONT></FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=913305812-17092007><FONT 
    face=Arial><FONT color=#0000ff><FONT size=2><SPAN 
    class=947490613-17092007></SPAN></FONT></FONT></FONT></SPAN> </DIV>
    <DIV dir=ltr align=left><SPAN class=913305812-17092007><FONT 
    face=Arial><FONT color=#0000ff><FONT size=2><SPAN 
    class=947490613-17092007>The below should get rid of some redundant 
    overlapping polygons, but probably won't completely satisfy what you want to 
    do.  I'm also thinking you may want to be using intersection 
    instead of geomunion for the inner part.  But again depends what you 
    are trying to answer.</SPAN></FONT></FONT></FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=913305812-17092007><FONT 
    face=Arial><FONT color=#0000ff><FONT size=2><SPAN 
    class=947490613-17092007></SPAN></FONT></FONT></FONT></SPAN> </DIV>
    <DIV dir=ltr align=left><SPAN class=913305812-17092007><FONT 
    face=Arial><FONT color=#0000ff><FONT size=2><SPAN 
    class=947490613-17092007></SPAN></FONT></FONT></FONT></SPAN> </DIV>
    <DIV dir=ltr align=left><SPAN class=913305812-17092007><SPAN 
    class=947490613-17092007>
    <DIV dir=ltr align=left><SPAN class=691344412-13092007><FONT face=Arial 
    color=#0000ff size=2>INSERT INTO abc(code, info, 
    the_geom)</FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=691344412-13092007>
    <DIV dir=ltr align=left><SPAN class=217440812-13092007><FONT 
    color=#0000ff><FONT face=Arial size=2>SELECT newtb.code,  </FONT><A 
    href="http://newtb.info/" target=_blank moz-do-not-send="true"><SPAN 
    id=lw_1190034122_1 
    style="BACKGROUND: 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial"><FONT 
    face=Arial color=#003399 size=2>newtb.info</FONT></SPAN></A><FONT face=Arial 
    size=2>, <SPAN class=947490613-17092007>multi(</SPAN><SPAN 
    class=947490613-17092007>buffer(</SPAN>geomunion(<SPAN 
    class=947490613-17092007>distinct </SPAN>newtb.cgeom)<SPAN 
    class=947490613-17092007>, 0.0))</SPAN> as 
    thenewgeom</FONT></FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=217440812-13092007><FONT face=Arial 
    color=#0000ff size=2>FROM </FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=217440812-13092007><FONT 
    face=Arial><FONT color=#0000ff><FONT size=2>(  SELECT <SPAN 
    class=691344412-13092007>a</SPAN>.code, <SPAN 
    class=691344412-13092007><A href="http://b.info/" target=_blank 
    moz-do-not-send="true"><SPAN 
    id=lw_1190034122_2>b</SPAN>.info</A></SPAN></FONT></FONT></FONT><FONT 
    face=Arial color=#0000ff size=2>, <SPAN 
    class=947490613-17092007><STRONG>intersection</STRONG></SPAN>(<SPAN 
    class=691344412-13092007>a</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN>, <SPAN 
    class=691344412-13092007>b</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN>) as cgeom</FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=217440812-13092007><FONT 
    color=#0000ff><FONT face=Arial><FONT size=2>    
    FROM <SPAN 
    class=691344412-13092007>a</SPAN></FONT></FONT></FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=217440812-13092007><FONT face=Arial 
    color=#0000ff size=2>        INNER 
    JOIN <SPAN class=691344412-13092007>b</SPAN> ON <SPAN 
    class=691344412-13092007>a</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN> && <SPAN 
    class=691344412-13092007>b</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN> AND intersects(<SPAN 
    class=691344412-13092007>a</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN>, <SPAN 
    class=691344412-13092007>b</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN>)</FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=217440812-13092007><FONT 
    face=Arial><FONT size=2>    <FONT color=#0000ff>UNION 
    ALL</FONT></FONT></FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=217440812-13092007><FONT face=Arial 
    size=2>    <FONT color=#0000ff>SELECT <SPAN 
    class=691344412-13092007>a</SPAN>.code, null As info, <SPAN 
    class=691344412-13092007>a</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN> as cgeom</FONT> </FONT>
    <DIV dir=ltr align=left><SPAN class=217440812-13092007><FONT face=Arial 
    color=#0000ff size=2>    FROM <SPAN 
    class=691344412-13092007>a</SPAN> </FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=217440812-13092007><FONT face=Arial 
    color=#0000ff size=2>        LEFT 
    JOIN <SPAN class=691344412-13092007>b</SPAN> ON <SPAN 
    class=691344412-13092007>a</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN> && <SPAN 
    class=691344412-13092007>b</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN> AND intersects(<SPAN 
    class=691344412-13092007>a</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN>, <SPAN 
    class=691344412-13092007>b</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN>)</FONT></SPAN></DIV></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=217440812-13092007><FONT face=Arial 
    color=#0000ff size=2>        
    WHERE <SPAN class=691344412-13092007>b</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN> IS NULL</FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=217440812-13092007><FONT 
    face=Arial><FONT size=2>    <FONT color=#0000ff>UNION 
    ALL</FONT></FONT></FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=217440812-13092007><FONT 
    face=Arial><FONT size=2>    <FONT color=#0000ff>SELECT null 
    as code, <SPAN class=691344412-13092007><A href="http://b.info/" 
    target=_blank moz-do-not-send="true"><FONT color=#003399><SPAN 
    id=lw_1190034122_3>b</SPAN>.info</FONT></A></SPAN>, <SPAN 
    class=691344412-13092007>b</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN> as 
    cgeom</FONT></FONT></FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=217440812-13092007><FONT face=Arial 
    color=#0000ff 
    size=2>            
    FROM <SPAN class=691344412-13092007>b</SPAN> LEFT JOIN <SPAN 
    class=691344412-13092007>a</SPAN> ON <SPAN 
    class=691344412-13092007>a</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN> && <SPAN 
    class=691344412-13092007>b</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN> AND intersects(<SPAN 
    class=691344412-13092007>a</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN>, <SPAN 
    class=691344412-13092007>b</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN>)</FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=217440812-13092007><FONT face=Arial 
    color=#0000ff 
    size=2>           
    WHERE <SPAN class=691344412-13092007>a</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN> IS NULL</FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=217440812-13092007><FONT face=Arial 
    color=#0000ff size=2>)  AS newtb</FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=217440812-13092007><FONT 
    color=#0000ff><FONT face=Arial size=2>GROUP BY newtb.code, </FONT><A 
    href="http://newtb.info/" target=_blank moz-do-not-send="true"><SPAN 
    id=lw_1190034122_4><FONT face=Arial color=#003399 
    size=2>newtb.info</FONT></SPAN></A></FONT></SPAN></DIV></SPAN></DIV></SPAN></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=913305812-17092007><FONT 
    face=Arial><FONT color=#0000ff><FONT size=2><SPAN 
    class=947490613-17092007></SPAN></FONT></FONT></FONT></SPAN> </DIV>
    <DIV dir=ltr align=left><SPAN class=913305812-17092007><FONT 
    face=Arial><FONT color=#0000ff><FONT size=2><SPAN 
    class=947490613-17092007></SPAN></FONT></FONT></FONT></SPAN> </DIV>
    <DIV dir=ltr align=left><SPAN class=913305812-17092007><FONT 
    face=Arial><FONT color=#0000ff><FONT size=2><SPAN 
    class=947490613-17092007>Hope that 
    helps,</SPAN></FONT></FONT></FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=913305812-17092007><FONT 
    face=Arial><FONT color=#0000ff><FONT size=2><SPAN 
    class=947490613-17092007>Regina</SPAN></FONT></FONT></FONT></SPAN></DIV></DIV><BR>
    <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
    <HR tabIndex=-1>
    <FONT face=Tahoma size=2><B>From:</B> <A class=moz-txt-link-abbreviated 
    href="mailto:postgis-users-bounces@postgis.refractions.net">postgis-users-bounces@postgis.refractions.net</A> 
    [<A class=moz-txt-link-freetext 
    href="mailto:postgis-users-bounces@postgis.refractions.net">mailto:postgis-users-bounces@postgis.refractions.net</A>] 
    <B>On Behalf Of </B>RAVI KUMAR<BR><B>Sent:</B> Monday, September 17, 2007 
    9:04 AM<BR><B>To:</B> postgis<BR><B>Subject:</B> [postgis-users] 
    UNION<BR></FONT><BR></DIV>
    <DIV>Hi Regina,</DIV>
    <DIV>giving the link to show actual how the UNION of polygons is not working 
    as per expectation.</DIV>
    <DIV>Please see the clips in the link.</DIV>
    <DIV> </DIV>
    <DIV>
    <DIV dir=ltr align=left><SPAN class=691344412-13092007><SPAN 
    class=691344412-13092007><FONT face=Arial color=#0000ff 
    size=2>CREATE TABLE abc(code smallint, info smallint) with 
    oids;</FONT></SPAN></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=691344412-13092007><SPAN 
    class=691344412-13092007><FONT face=Arial color=#0000ff size=2>SELECT 
    AddGeometryColumn('public', 'abc', 'the_geom', 4326, 'MULTIPOLYGON', 
    2);</FONT></SPAN></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=691344412-13092007></SPAN> </DIV>
    <DIV dir=ltr align=left><SPAN class=691344412-13092007><FONT face=Arial 
    color=#0000ff size=2>--The insert</FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=691344412-13092007></SPAN> </DIV>
    <DIV dir=ltr align=left><SPAN class=691344412-13092007><FONT face=Arial 
    color=#0000ff size=2>INSERT INTO abc(code, info, 
    the_geom)</FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=691344412-13092007>
    <DIV dir=ltr align=left><SPAN class=217440812-13092007><FONT face=Arial 
    color=#0000ff size=2>SELECT newtb.code,  <A href="http://newtb.info/" 
    target=_blank moz-do-not-send="true"><SPAN id=lw_1190034122_1 
    style="BACKGROUND: 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial"><FONT 
    color=#003399>newtb.info</FONT></SPAN></A>, geomunion(newtb.cgeom) as 
    thenewgeom</FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=217440812-13092007><FONT face=Arial 
    color=#0000ff size=2>FROM </FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=217440812-13092007><FONT face=Arial 
    color=#0000ff size=2>(  SELECT <SPAN 
    class=691344412-13092007>a</SPAN>.code, <SPAN 
    class=691344412-13092007><A href="http://b.info/" target=_blank 
    moz-do-not-send="true"><FONT color=#003399><SPAN 
    id=lw_1190034122_2>b</SPAN>.info</FONT></A></SPAN>, geomunion(<SPAN 
    class=691344412-13092007>a</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN>, <SPAN 
    class=691344412-13092007>b</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN>) as cgeom</FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=217440812-13092007><FONT 
    face=Arial><FONT color=#0000ff><FONT size=2>    
    FROM <SPAN 
    class=691344412-13092007>a</SPAN></FONT></FONT></FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=217440812-13092007><FONT face=Arial 
    color=#0000ff size=2>        INNER 
    JOIN <SPAN class=691344412-13092007>b</SPAN> ON <SPAN 
    class=691344412-13092007>a</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN> && <SPAN 
    class=691344412-13092007>b</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN> AND intersects(<SPAN 
    class=691344412-13092007>a</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN>, <SPAN 
    class=691344412-13092007>b</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN>)</FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=217440812-13092007>    
    <FONT face=Arial color=#0000ff size=2>UNION ALL</FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=217440812-13092007>    
    <FONT face=Arial color=#0000ff size=2>SELECT <SPAN 
    class=691344412-13092007>a</SPAN>.code, null As info, <SPAN 
    class=691344412-13092007>a</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN> as cgeom</FONT> 
    <DIV dir=ltr align=left><SPAN class=217440812-13092007><FONT face=Arial 
    color=#0000ff size=2>    FROM <SPAN 
    class=691344412-13092007>a</SPAN> </FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=217440812-13092007><FONT face=Arial 
    color=#0000ff size=2>        LEFT 
    JOIN <SPAN class=691344412-13092007>b</SPAN> ON <SPAN 
    class=691344412-13092007>a</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN> && <SPAN 
    class=691344412-13092007>b</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN> AND intersects(<SPAN 
    class=691344412-13092007>a</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN>, <SPAN 
    class=691344412-13092007>b</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN>)</FONT></SPAN></DIV></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=217440812-13092007><FONT face=Arial 
    color=#0000ff size=2>        
    WHERE <SPAN class=691344412-13092007>b</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN> IS NULL</FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=217440812-13092007>    
    <FONT face=Arial color=#0000ff size=2>UNION ALL</FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=217440812-13092007>    
    <FONT face=Arial color=#0000ff size=2>SELECT null as code, <SPAN 
    class=691344412-13092007><A href="http://b.info/" target=_blank 
    moz-do-not-send="true"><FONT color=#003399><SPAN 
    id=lw_1190034122_3>b</SPAN>.info</FONT></A></SPAN>, <SPAN 
    class=691344412-13092007>b</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN> as cgeom</FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=217440812-13092007><FONT face=Arial 
    color=#0000ff 
    size=2>            
    FROM <SPAN class=691344412-13092007>b</SPAN> LEFT JOIN <SPAN 
    class=691344412-13092007>a</SPAN> ON <SPAN 
    class=691344412-13092007>a</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN> && <SPAN 
    class=691344412-13092007>b</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN> AND intersects(<SPAN 
    class=691344412-13092007>a</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN>, <SPAN 
    class=691344412-13092007>b</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN>)</FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=217440812-13092007><FONT face=Arial 
    color=#0000ff 
    size=2>           
    WHERE <SPAN class=691344412-13092007>a</SPAN>.geom<SPAN 
    class=691344412-13092007>etry</SPAN> IS NULL</FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=217440812-13092007><FONT face=Arial 
    color=#0000ff size=2>)  AS newtb</FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=217440812-13092007><FONT face=Arial 
    color=#0000ff size=2>GROUP BY newtb.code, <A href="http://newtb.info/" 
    target=_blank moz-do-not-send="true"><SPAN id=lw_1190034122_4><FONT 
    color=#003399>newtb.info</FONT></SPAN></A></FONT></SPAN></DIV></SPAN></DIV></DIV>
    <DIV> </DIV>
    <DIV>May be I should be using different syntax for such a result.</DIV>
    <DIV> </DIV>
    <DIV> </DIV>
    <DIV><A 
    href="http://www.kodakgallery.com/I.jsp?c=cjns10h3.8ovw4dsn&x=0&y=w3kbw0" 
    target=_blank rel=nofollow moz-do-not-send="true"><SPAN id=lw_1190033901_2 
    style="BACKGROUND: rgb(220,238,255) 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial"><FONT 
    face=Verdana color=#003399 
    size=1>http://www.kodakgallery.com/I.jsp?c=cjns10h3.8ovw4dsn&x=0&y=w3kbw0</FONT></SPAN></A><FONT 
    face=Verdana size=1> </FONT></DIV>
    <DIV> </DIV>
    <DIV><FONT face=Verdana size=1>Ravi Kumar</FONT></DIV>
    <DIV></DIV>
    <HR SIZE=1>
    Catch up on <A 
    href="http://us.rd.yahoo.com/tv/mail/tagline/falltv/evt=47093/*http://tv.yahoo.com/collections/3658%20" 
    moz-do-not-send="true">fall's hot new shows</A> on Yahoo! TV. Watch 
    previews, get listings, and more! 
    <HR SIZE=1>

    <DIV><STRONG>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. 
    </STRONG></DIV>_______________________________________________<BR>postgis-users 
    mailing list<BR><A class=moz-txt-link-abbreviated 
    href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</A><BR><A 
    class=moz-txt-link-freetext 
    href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A><BR></BLOCKQUOTE><BR>
  <P></P>
  <HR SIZE=1>
  Need a vacation? <A 
  href="http://us.rd.yahoo.com/evt=48256/*http://travel.yahoo.com/;_ylc=X3oDMTFhN2hucjlpBF9TAzk3NDA3NTg5BHBvcwM1BHNlYwNncm91cHMEc2xrA2VtYWlsLW5jbQ--" 
  moz-do-not-send="true">Get great deals to amazing places </A>on Yahoo! Travel. 
<PRE wrap=""><HR width="90%" SIZE=4>
_______________________________________________
postgis-users mailing list
<A class=moz-txt-link-abbreviated href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</A>
<A class=moz-txt-link-freetext href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A>
  </PRE></BLOCKQUOTE></BODY></HTML>

<HTML><BODY><P><hr size=1></P>
<P><STRONG>
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.
</STRONG></P></BODY></HTML>