2017-03-27 13:17:21 -05:00
|
|
|
##Select by expression=name
|
|
|
|
##Tests=group
|
2017-06-27 13:05:16 +10:00
|
|
|
|
|
|
|
#inputs
|
|
|
|
|
2017-03-27 13:17:21 -05:00
|
|
|
##INPUT_LAYER=vector
|
2017-07-08 15:25:45 +10:00
|
|
|
##OUTPUT_LAYER=vectorDestination
|
2017-06-27 13:05:16 +10:00
|
|
|
|
2017-03-27 13:17:21 -05:00
|
|
|
|
|
|
|
import processing
|
|
|
|
|
|
|
|
result = processing.run("qgis:selectbyexpression",
|
2017-06-27 13:05:16 +10:00
|
|
|
{'INPUT': INPUT_LAYER,
|
|
|
|
'EXPRESSION': '"id2" = 0 and "id" > 7',
|
|
|
|
'METHOD': 1}, context=context, feedback=feedback)
|
2017-03-27 13:17:21 -05:00
|
|
|
|
2017-06-27 13:05:16 +10:00
|
|
|
result = processing.run("qgis:saveselectedfeatures",
|
|
|
|
{'INPUT': result["OUTPUT"],
|
|
|
|
'OUTPUT': parameters['OUTPUT_LAYER']},
|
|
|
|
context=context, feedback=feedback)
|
|
|
|
OUTPUT_LAYER = result['OUTPUT']
|