Hello,<br><br>a working example with ogr2ogr embeded<br><br>#####################################################################<br># clip_shp_to_shp.py<br>import os<br>import glob<br><br>def clip_shp_to_shp(directory, shpclippath, pref="", suf="_clip"):<br>


    # List shp file in a directory (not recursive)<br>    listResults = glob.glob(os.path.join(directory, '*.shp'))<br>    # call ogr2ogr to clip with shpclip var<br>    import subprocess<br>    for source in listResults:<br>


        subprocess.call(["ogr2ogr", "-f", "ESRI Shapefile", "-clipsrc", shpclip, os.path.basename(source) + "_clip.shp", source])<br><br># set clipping shp path<br>shpclip = "/home/thomas/git/python_scripts/clipping_area.shp"<br>


# set dir where searching shp to clip<br>directory = os.getcwd()<br>clip_shp_to_shp(directory, shpclip)<br>#####################################################################<br><br><br>Regards<br><br>ThomasG<br>GIS specialist<br>