mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-03 00:02:25 -05:00
22 lines
627 B
Python
22 lines
627 B
Python
##Select by expression=name
|
|
##Tests=group
|
|
|
|
#inputs
|
|
|
|
##INPUT_LAYER=vector
|
|
##OUTPUT_LAYER=vectorDestination
|
|
|
|
|
|
import processing
|
|
|
|
result = processing.run("qgis:selectbyexpression",
|
|
{'INPUT': INPUT_LAYER,
|
|
'EXPRESSION': '"id2" = 0 and "id" > 7',
|
|
'METHOD': 1}, context=context, feedback=feedback)
|
|
|
|
result = processing.run("qgis:saveselectedfeatures",
|
|
{'INPUT': result["OUTPUT"],
|
|
'OUTPUT': parameters['OUTPUT_LAYER']},
|
|
context=context, feedback=feedback)
|
|
OUTPUT_LAYER = result['OUTPUT']
|