<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Hi Shreyes,<br>
    <br>
    if I understand your question right, it's not much different from
    what you asked before. You would select the intersecting geometries
    of both tables by asking for
    st_intersects(a.the_geom,b.the_geom)=true, then intersect those
    geometries with st_intersection() and then calculate the area of the
    intersection with st_area(). For the identification of the origin of
    the resulting geometries, you select the id columns of the tables
    plots and parcels, too - so, you would see that plot S01BAT009 does
    have intersecting geometries with parcels P1, P2 and P3 (in your
    example). Here an example for such a query:<br>
    <br>
    select<br>
    a.plot_id,<br>
    b.parcel_id,<br>
    st_area(st_intersection(a.the_geom, b.the_geom)) as the_geom<br>
    from<br>
    plots a<br>
    inner join<br>
    parcels b<br>
    on a.the_geom && b.the_geom<br>
    where st_intersects(a.the_geom, b.the_geom);<br>
    <br>
    I don't know exactly what you mean by redundant tuples - perhaps it
    would help, if you would post your query and an example of its
    result here too...<br>
    <br>
    Regards,<br>
    <br>
    Birgit.<br>
    <br>
    <br>
    Am 05.05.2011 14:35, schrieb shreyes shiv:
    <blockquote
      cite="mid:BANLkTinwmH9m9Vrd3E2F0vyKX0xmHtJn0w@mail.gmail.com"
      type="cite">Dear all,
      <div><br>
      </div>
      <div>I have two shape files plots and parcels.</div>
      <div><br>
      </div>
      <div>the attributes of the "plots" shape file are</div>
      <div>plot_id</div>
      <div>plot_area</div>
      <div>owner_nm</div>
      <div>the_geom</div>
      <div><br>
      </div>
      <div>the attributes of the "parcels" shape file are</div>
      <div>parcel_id</div>
      <div>parcel_area</div>
      <div>conversion</div>
      <div>the_geom</div>
      <div><br>
      </div>
      <div>when i do the ST_Intersects operation on the shape files it
        returns a table that contains redundant tuples.</div>
      <div>what i want is the area of the newly formed polygons which
        are formed after the intersection as an extra column.</div>
      <div><br>
      </div>
      <div>This image explains my problem.</div>
      <div><img src="cid:part1.00070908.02010009@vti.bund.de"
          alt="parcelplotresult-1.jpg" title="parcelplotresult-1.jpg"><br>
      </div>
      <div><br>
      </div>
      <div>
        <div>The Plot S01BAT009 lying in Parcels P1, P2 and P3, and also
          occupying the area A1, A2 and A3 in the respective parcels.
          The white lines are the parcel boundaries. The black lines are
          the plot boundaries.</div>
        <div>I want the areas A1, A2 and A3.</div>
        <div><br>
        </div>
        <div>please help.</div>
        <div><br>
        </div>
        <div><br>
        </div>
      </div>
      <br>
      -- <br>
      shreyes shiv<br>
      email: <a moz-do-not-send="true"
        href="mailto:shivshreyes@gmail.com">shivshreyes@gmail.com</a><br>
      phone: 9557975780<br>
      IIRS(Indian Institute of Remote Sensing)<br>
      No. 4, Kalidas Road, Dehradun-248001, Uttarakhand, India<br>
    </blockquote>
  </body>
</html>