I am new to the gdal/ogr library for python and I was wondering how to clip a shp file by another shp file. I think I am having trouble with the syntax. Thanks - Stefan
I keep getting a windows error message: "WindowsError: [Error 2] The system cannot find the file specified"
import subprocess ##The features used to clip the input features.** clipping_shp = "US_States_STATE_NAME__Oregon.shp" ##The feature class to be created.** output_shp = "output1.shp" ##The features to be clipped.** input_shp = "broadcast_national_ALL.shp" ##Clipping process** subprocess.call(["ogr2ogr", "-f", "ESRI Shapefile", "-clipsrc", clipping_shp, output_shp, input_shp])