|
@@ -52,32 +52,36 @@ from processing.tools.SubprocessUtils import RunSubprocess
|
|
import processing.tools.QGS.load
|
|
import processing.tools.QGS.load
|
|
from qgis.PyQt.QtCore import NULL
|
|
from qgis.PyQt.QtCore import NULL
|
|
|
|
|
|
|
|
+import config
|
|
|
|
+
|
|
pluginPath = os.path.normpath(os.path.join(
|
|
pluginPath = os.path.normpath(os.path.join(
|
|
os.path.split(os.path.dirname(__file__))[0], os.pardir))
|
|
os.path.split(os.path.dirname(__file__))[0], os.pardir))
|
|
|
|
|
|
|
|
|
|
class GdalAlgorithm(QgsProcessingAlgorithm):
|
|
class GdalAlgorithm(QgsProcessingAlgorithm):
|
|
-
|
|
|
|
def __init__(self):
|
|
def __init__(self):
|
|
super().__init__()
|
|
super().__init__()
|
|
- # TODO wanger GdalAlgorithm全局参数配置
|
|
|
|
|
|
+ self.db_config = config.CONFIG['db']
|
|
|
|
+ self.geoserver_config = config.CONFIG['geoserver']
|
|
|
|
+
|
|
|
|
+ # 全局参数修改
|
|
self.output_values = {}
|
|
self.output_values = {}
|
|
self.spatialite_db_path = "D:\\temp\\output.sqlite"
|
|
self.spatialite_db_path = "D:\\temp\\output.sqlite"
|
|
self.pgcoon = {
|
|
self.pgcoon = {
|
|
- "host": "192.168.60.52",
|
|
|
|
- "schema": "vector",
|
|
|
|
- "port": "5432",
|
|
|
|
- "user": "postgres",
|
|
|
|
- "password": "postgres",
|
|
|
|
- "dbname": "real3d"
|
|
|
|
|
|
+ "host": self.db_config['host'],
|
|
|
|
+ "schema": self.db_config['schema'],
|
|
|
|
+ "port": self.db_config['port'],
|
|
|
|
+ "user": self.db_config['user'],
|
|
|
|
+ "password": self.db_config['password'],
|
|
|
|
+ "dbname": self.db_config['name']
|
|
}
|
|
}
|
|
self.geoservercoon = {
|
|
self.geoservercoon = {
|
|
- "url": "http://192.168.60.2:28085/geoserver",
|
|
|
|
- "username": "admin",
|
|
|
|
- "password": "geoserver",
|
|
|
|
- "defaultworkspace": "demo",
|
|
|
|
- "cachestart": "0",
|
|
|
|
- "cacheend": "15"
|
|
|
|
|
|
+ "url": self.geoserver_config['url'],
|
|
|
|
+ "username": self.geoserver_config['username'],
|
|
|
|
+ "password": self.geoserver_config['password'],
|
|
|
|
+ "defaultworkspace": self.geoserver_config['default_workspace'],
|
|
|
|
+ "cachestart": self.geoserver_config['cachestart'],
|
|
|
|
+ "cacheend": self.geoserver_config['cacheend']
|
|
}
|
|
}
|
|
|
|
|
|
def icon(self):
|
|
def icon(self):
|