I want to write a Python function to create a shapefile layer from clipping an input layer using a mask.
Does someone know the way how to do it?
I want to write a Python function to create a shapefile layer from clipping an input layer using a mask.
Does someone know the way how to do it?
import subprocess
subprocess.call(["ogr2ogr", "-f", "ESRI Shapefile", "-clipsrc", mymask, myresult, myinput], shell=True)
The my***s are all shapefiles.