管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-11-04 a8e28b8fbc85315288448f8697efc6670aa9cbd8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# exec(open('D:/pyspace/demo/main.py', encoding='utf-8').read())
from qgis.core import *
# from qgis.gui import (QgsLayerTreeMapCanvasBridge)
 
# QgsApplication.setPrefixPath("e:/", True)
 
qgs = QgsApplication([], True)
qgs.initQgis()
 
project = QgsProject.instance()
project.read(r'E:/data/1.Natural_Earth/Test.qgz')
print("FileName: " + project.fileName())
 
# project.write("E:/new_qgis_project.qgz")
qgs.exitQgis()