[Qgis-user] Python Code to Clip Vector layers

Nathan Woodrow madmanwoo at gmail.com
Tue May 10 23:56:25 PDT 2011


Check out {QGIS install}\python\plugins\fTools\tools\doGeoprocessing.py

The code for the built in clip tools are written in python, so you can just
steal the code from there.

- Nathan

On Wed, May 11, 2011 at 9:06 AM, DelphineJB <del_cadarn at hotmail.com> wrote:

> I am new to Python programming and relatively new to QGIS. So beware my
> question is ridiculously simple but for some reason I have been turning in
> circles on the web and on QGIS for more than a day now trying to find an
> answer.
>
> So I am looking for the Python Code to clip Vector Layers
>
> I know how to clip vector layers using the plugins available on the
> software.
> But what I am looking for is the python code which will enable me to clip
> vector layers out of another vector polygon (all in shapefile).
> - I am trying to document the process of a specific GIS analysis so that it
> can be repeatable, python code seemed the best solution following my
> employer's opinion -
>
> I have looked on the web for a simple piece of code, I have explored dir()
> of both ftools and gdal, but nothing seems to jump out despite that I know
> fine well that it must be somewhere.
>
> Could anyone suggest me a code or at the very least where to look?
>
>           Thank you,
>
>                       Delphine
>
> -----
> And a happy non-birthday to you, said the Mad Hatter
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/Python-Code-to-Clip-Vector-layers-tp6350004p6350004.html
> Sent from the qgis-user mailing list archive at Nabble.com.
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20110511/8a500b15/attachment.html>


More information about the Qgis-user mailing list