Check out {QGIS install}\python\plugins\fTools\tools\doGeoprocessing.py <div><br></div><div>The code for the built in clip tools are written in python, so you can just steal the code from there.<div><br></div><div>- Nathan<br>

<br><div class="gmail_quote">On Wed, May 11, 2011 at 9:06 AM, DelphineJB <span dir="ltr"><<a href="mailto:del_cadarn@hotmail.com">del_cadarn@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

I am new to Python programming and relatively new to QGIS. So beware my<br>
question is ridiculously simple but for some reason I have been turning in<br>
circles on the web and on QGIS for more than a day now trying to find an<br>
answer.<br>
<br>
So I am looking for the Python Code to clip Vector Layers<br>
<br>
I know how to clip vector layers using the plugins available on the<br>
software.<br>
But what I am looking for is the python code which will enable me to clip<br>
vector layers out of another vector polygon (all in shapefile).<br>
- I am trying to document the process of a specific GIS analysis so that it<br>
can be repeatable, python code seemed the best solution following my<br>
employer's opinion -<br>
<br>
I have looked on the web for a simple piece of code, I have explored dir()<br>
of both ftools and gdal, but nothing seems to jump out despite that I know<br>
fine well that it must be somewhere.<br>
<br>
Could anyone suggest me a code or at the very least where to look?<br>
<br>
           Thank you,<br>
<br>
                       Delphine<br>
<br>
-----<br>
And a happy non-birthday to you, said the Mad Hatter<br>
<font color="#888888">--<br>
View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/Python-Code-to-Clip-Vector-layers-tp6350004p6350004.html" target="_blank">http://osgeo-org.1803224.n2.nabble.com/Python-Code-to-Clip-Vector-layers-tp6350004p6350004.html</a><br>


Sent from the qgis-user mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
</font></blockquote></div><br></div></div>