<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Correct.  See
    <a class="moz-txt-link-freetext" href="http://postgis.net/docs/manual-2.0/ST_Intersection.html">http://postgis.net/docs/manual-2.0/ST_Intersection.html</a><br>
    <br>
    <div class="moz-cite-prefix">On 1/14/2013 5:14 PM, Tim-Hinnerk Heuer
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAApG7tZ5qAcPzoPtm6eX9k=RCKxzFAmSr=FmPgpm0hR=e-HAYw@mail.gmail.com"
      type="cite">
      <p>I think Nicolas is more correct. St_Intersection sounds like a
        function that gets a geometry while St_Intersects returns a
        Boolean. </p>
      <div class="gmail_quote">On Jan 15, 2013 6:24 AM, "Francisco
        Salas" <<a moz-do-not-send="true"
          href="mailto:fsalas@pinar.geocuba.cu">fsalas@pinar.geocuba.cu</a>>
        wrote:<br type="attribution">
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div link="blue" vlink="purple" lang="ES-MX">
            <div>
              <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"
                  lang="EN-US">Martha ,</span></p>
              <p class="MsoNormal">
                <span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"
                  lang="EN-US">I think that you must use in the select
                  sentence </span><span lang="EN-US">st_intersects(a.the_geom,
                  b.the_geom) as the_geom , </span><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"
                  lang="EN-US">instead of </span><span lang="EN-US">a.the_geom</span><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"
                  lang="EN-US"></span></p>
              <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"
                  lang="EN-US"> </span></p>
              <p class="MsoNormal">Francisco Salas<br>
                <br>
              </p>
              <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p>
              <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif""
                    lang="ES">De:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif""
                  lang="ES"> <a moz-do-not-send="true"
                    href="mailto:postgis-users-bounces@lists.osgeo.org"
                    target="_blank">postgis-users-bounces@lists.osgeo.org</a>
                  [mailto:<a moz-do-not-send="true"
                    href="mailto:postgis-users-bounces@lists.osgeo.org"
                    target="_blank">postgis-users-bounces@lists.osgeo.org</a>]
                  <b>En nombre de </b>Marta Debolini<br>
                  <b>Enviado el:</b> lunes, 14 de enero de 2013 12:01
                  p.m.<br>
                  <b>Para:</b> <a moz-do-not-send="true"
                    href="mailto:postgis-users@lists.osgeo.org"
                    target="_blank">postgis-users@lists.osgeo.org</a><br>
                  <b>Asunto:</b> [postgis-users] clip polygons</span></p>
              <p class="MsoNormal"> </p>
              <p class="MsoNormal">Hi, <br>
                I am a new postgis user, so sorry if my request seems
                trivial for someone.<br>
                <br>
                I have to clip a polygon with another polygon file. I
                was used to do this operation with the simple comand
                "clip" in GRASS or QGIS. <br>
                How can I do the same operation in postgis? I tried with
                sy_intersect, but it takes also the polygons outside my
                area, which simply intersect the border.<br>
                The request I wrote is:<br>
                <br>
                <br>
                CREATE TABLE w_md.x<br>
                AS (SELECT area, a.the_geom<br>
                    FROM oc a, co b<br>
                    WHERE st_intersects(a.the_geom, b.the_geom));<br>
                    <br>
                    ALTER TABLE w_md.x_1999 ADD column ggid1 serial;<br>
                     ALTER TABLE w_mdi.x_1999 ADD PRIMARY KEY (ggID1);<br>
                <br>
                Thank you for your help,<br>
                <br>
                Marta</p>
            </div>
          </div>
          <br>
          _______________________________________________<br>
          postgis-users mailing list<br>
          <a moz-do-not-send="true"
            href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
          <a moz-do-not-send="true"
            href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users"
            target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
          <br>
        </blockquote>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
postgis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a>
</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <p class="" avgcert""="" color="#000000" align="left">No virus
        found in this message.<br>
        Checked by AVG - <a moz-do-not-send="true"
          href="http://www.avg.com">www.avg.com</a><br>
        Version: 2013.0.2805 / Virus Database: 2637/6000 - Release Date:
        12/31/12<br>
        Internal Virus Database is out of date.</p>
    </blockquote>
    <br>
  </body>
</html>