[Qgis-user] Python Code to Clip Vector layers

Alister Hood alister.hood at synergine.com
Tue May 10 23:44:16 PDT 2011


ArcPy?
Perhaps you are confused about which mailing list this discussion is
on...

> Date: Tue, 10 May 2011 22:57:47 -0500
> From: Brad Nesom <gisbradokla at live.com>
> Subject: Re: [Qgis-user] Python Code to Clip Vector layers
> To: DelphineJB <del_cadarn at hotmail.com>
> Cc: qgis-user at lists.osgeo.org
> Message-ID: <BANLkTi=jMfqB21m=FPrpTbZmoGRmVeAh2g at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Did you look in arcpy?
> 
> On Tue, May 10, 2011 at 6:18 PM, Saber <razmjooeis at faunalia.co.uk>
wrote:
> 
> > For basic clipping, you can try ogr2ogr tool. Its a command line
tool which
> > you can write shell scripts for.
> >
> > Cheers
> > Saber
> >
> > 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



More information about the Qgis-user mailing list