PyQGIS
Getting list of layer names using PyQGIS?
from qgis.core import QgsProject
names = [layer.name() for layer in QgsProject.instance().mapLayers().values()]
print(names)
this produces a list of layers in the current project:
['GoogleSat', 'MyPointsLayer', 'R
原创
2020-05-26 22:31:59 ·
1021 阅读 ·
0 评论