<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 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 lang="ES-MX" link="blue" vlink="purple"><div><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Martha ,<u></u><u></u></span></p><p class="MsoNormal">
<span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">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 lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">instead of </span><span lang="EN-US">a.the_geom</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal">Francisco Salas<br><br><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><b><span lang="ES" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">De:</span></b><span lang="ES" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:postgis-users-bounces@lists.osgeo.org" target="_blank">postgis-users-bounces@lists.osgeo.org</a> [mailto:<a 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 href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br><b>Asunto:</b> [postgis-users] clip polygons<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></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<u></u><u></u></p></div></div><br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a 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>