# Buku "Python untuk GIS", Bab 15: Lemari Data yang Patuh: Atribut, Seleksi, Digitasi, dan Laporan dengan Skrip
# Skrip 15.2: Memilih fitur dengan seleksi
petak.selectByExpression("\"JENIS\" = 'Mahoni' AND \"STATUS\" = 'Produksi'")
print(kode_terpilih(petak))

processing.run("native:selectbylocation", {"INPUT": plot, "PREDICATE": [2], "INTERSECT": petak, "METHOD": 0})
print(sorted(f["ID_PLOT"] for f in plot.selectedFeatures()))
