I've loaded two shape files using pyqgis like so:
data_layer = QgsVectorLayer("lines.shp", "highways", "ogr") clip_layer = QgsVectorLayer("polygon.shp", "highways", "ogr")
As the names of the source files suggest one of the files consists of line geometry data and the other of polygon data. I'd like to do the GUI operation Vector->Geoprocessing Tools->Clip operation in code. Something like:
new_layer = QgsClip(clip_layer, data_layer)
I notice QgsClipper in the API docs but that only does rectangular clipping as far as I can see.
Is there a function that does what I want?