Hello,
a working example with ogr2ogr embeded
#
# clip_shp_to_shp.py
import os
import glob
def clip_shp_to_shp(directory, shpclippath, pref="", suf="_clip"):
# List shp file in a directory (not recursive)
listResults = g
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 wrote:
> I am new to Python programming and relatively new to QGIS
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
> Subject: Re: [Qgis-user] Python Code to Clip Vector layers
> To: DelphineJB
> Cc: qgis-user@lists.osgeo.org
> Message-ID:
> Con
Did you look in arcpy?
On Tue, May 10, 2011 at 6:18 PM, Saber wrote:
> For basic clipping, you can try ogr2ogr tool. Its a command line tool which
> you can write shell scripts for.
>
> Cheers
> Saber
>
> DelphineJB wrote:
>
> >I am new to Python programming and relatively new to QGIS. So bewar
For basic clipping, you can try ogr2ogr tool. Its a command line tool which you
can write shell scripts for.
Cheers
Saber
DelphineJB 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
>circ
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