<!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>
<DIV dir=ltr align=left><SPAN class=430184215-11092007><FONT face=Arial
color=#0000ff size=2>Ravi,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=430184215-11092007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=430184215-11092007><FONT face=Arial
color=#0000ff size=2>Still not quite clear what question you are trying to
answer.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=430184215-11092007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=430184215-11092007><FONT face=Arial
color=#0000ff size=2>I am guessing that you are getting duplicates because you
have a one to many going on here. But I'm not sure which is the one and
which is the many.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=430184215-11092007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=430184215-11092007><FONT face=Arial
color=#0000ff size=2>Also you don't need coalesce here since that is only useful
if you expect one of your fields to be null. In this case since you are
doing an inner join, neither will be NULL. Or perhaps you don't want to do
an inner join.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=430184215-11092007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=430184215-11092007><FONT face=Arial
color=#0000ff size=2>It might be that you really want to use the aggregate form
of geomunion</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=430184215-11092007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=430184215-11092007><FONT face=Arial
color=#0000ff size=2>Something like</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=430184215-11092007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=430184215-11092007>SELECT strubuf.struclass,
geomunion(geof.geometry) AS geofac </SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=430184215-11092007>FROM geof INNER JOIN
strubuf ON (geof.geometry && strubuf.geometry
AND<BR> intersects(strubuf.geometry, geof.geometry))</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=430184215-11092007>GROUP BY
strubuf.struclass</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=430184215-11092007></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=430184215-11092007><FONT face=Arial
color=#0000ff size=2>Just a guess. But perhaps that doesn't answer the
question you were trying to ask.</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>RAVI
KUMAR<BR><B>Sent:</B> Tuesday, September 11, 2007 6:26 AM<BR><B>To:</B>
jump-users@lists.jump-project.org<BR><B>Cc:</B> postgis<BR><B>Subject:</B>
[postgis-users] UNION<BR></FONT><BR></DIV>
<DIV></DIV>Hi,<BR>I have prepared a course material for training in Jump for
Geoscientists.<BR>Added a minerological theme in which the final output results
in prospectivity map.<BR><BR>I have used Post-GIS where ever complex bullion
operators are needed. This was done smoothly.<BR><BR>But Iam now held-up in
UNION and Intersection. Jump gives an OVERLAY which equals intersection. But the
problem needs both<BR>Intersected portion and<BR>Non intersecting portion
together.<BR><BR>Followed the advise given on this list to get the result. But
the result<BR>OPENJUMP<BR>1.Overlay Layers A, B<BR>2. Make union of the result
(to use as a mask)<BR>3. A-Union and B-union and combine theses two layers<BR>4.
Add Overlay to this.<BR><BR>This does the work but you have duplicate geometries
which are filled with different attributes in different
instances.<BR>POSTGIS:<BR>Followinf the suggestions on the Postgis list I have
tried this query.<BR>SELECT strubuf.struclass,
COALESCE(geomunion(strubuf.geometry,<BR> geof.geometry), geof.geometry) AS
geofac FROM geof INNER JOIN strubuf ON (geof.geometry &&
strubuf.geometry AND<BR> intersects(strubuf.geometry,
geof.geometry));<BR><BR>But this doesnt result in a table
geofac<BR><BR><BR><BR>This is where I am..<BR>But for this additional exercise
every thing else is ready.<BR>However Proof of Concept for Geoscientists lies in
THIS.<BR><BR><BR>Cheers<BR>Ravi Kumar
<P>
<HR SIZE=1>
Be a better Heartthrob. <A
href="http://us.rd.yahoo.com/evt=48255/*http://answers.yahoo.com/dir/_ylc=X3oDMTI5MGx2aThyBF9TAzIxMTU1MDAzNTIEX3MDMzk2NTQ1MTAzBHNlYwNCQUJwaWxsYXJfTklfMzYwBHNsawNQcm9kdWN0X3F1ZXN0aW9uX3BhZ2U-?link=list&sid=396545433">Get
better relationship answers </A>from someone who knows.<BR>Yahoo! Answers -
Check it out. </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>