I am having trouble with my code for selecting all points within a buffer layer, with the error given below. I am using this documentation as reference for the field formats: https://docs.qgis.org/2.6/en/docs/user_manual/processing_algs/qgis/vector_selection_tools/selectbylocation.html . I also tried the solution posted here How to use qgis:selectbylocation in PyQGIS? . Is there something that I'm missing?
processing.runalg("qgis:selectbylocation",
"/Users/pgcseismolab/Desktop/qgis/moment_all.shp",
"/Users/pgcseismolab/Desktop/jaden_pgc_archive/Blast_Files/Blast_buffers/blast_induced_buff.shp",
False,
False,
False,
0)
Error: Wrong number of parameters
ALGORITHM: Select by location
INPUT <ParameterVector>
INTERSECT <ParameterVector>
PREDICATE <ParameterGeometryPredicate>
PRECISION <ParameterNumber>
METHOD <ParameterSelection>
OUTPUT <OutputVector>
METHOD(Modify current selection by) 0 - creating new selection 1 - adding to current selection 2 - removing from current selection
EDIT: I am using QGIS 2.14, and have updated my code as follows (with the error below). Following documentation posted here: http://docs.qgis.org/2.14/en/docs/user_manual/processing_algs/qgis/vector_selection_tools.html?highlight=selectbylocation
processing.runalg("qgis:selectbylocation",
"/Users/pgcseismolab/Desktop/qgis/moment_all.shp",
"/Users/pgcseismolab/Desktop/jaden_pgc_archive/Blast_Files/Blast_buffers/blast_induced_buff.shp",
'within',
0)
Error: Wrong number of parameters
ALGORITHM: Select by location
INPUT <ParameterVector>
INTERSECT <ParameterVector>
PREDICATE <ParameterGeometryPredicate>
PRECISION <ParameterNumber>
METHOD <ParameterSelection>
OUTPUT <OutputVector>