mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-04 00:30:59 -05:00
17 lines
416 B
Python
17 lines
416 B
Python
|
##Select by attribute=name
|
||
|
##Tests=group
|
||
|
##INPUT_LAYER=vector
|
||
|
##OUTPUT_LAYER=output vector
|
||
|
|
||
|
import processing
|
||
|
|
||
|
result = processing.runalg("qgis:selectbyattribute",
|
||
|
INPUT_LAYER,
|
||
|
"id2",
|
||
|
0,
|
||
|
"2")
|
||
|
|
||
|
processing.runalg("qgis:saveselectedfeatures",
|
||
|
result["OUTPUT"],
|
||
|
OUTPUT_LAYER)
|