diff --git a/dem_to_csmap.py b/dem_to_csmap.py
index 7225dc6..980f8d2 100644
--- a/dem_to_csmap.py
+++ b/dem_to_csmap.py
@@ -35,7 +35,24 @@ def __init__(self):
self.ui.pushButton_cancel.clicked.connect(self.close)
def convert_dem_to_csmap(self):
- params = process.CsmapParams()
+ # パラメータの設定
+ params = process.CsmapParams(
+ gf_size=self.ui.spinBoxGfSize.value(),
+ gf_sigma=self.ui.SpinBoxGfSigma.value(),
+ curvature_size=self.ui.spinBoxCurvatureSize.value(),
+ height_scale=(
+ self.ui.spinBoxHeightScaleMin.value(),
+ self.ui.spinBoxHeightScaleMax.value(),
+ ),
+ slope_scale=(
+ self.ui.doubleSpinBoxSlopeScaleMin.value(),
+ self.ui.doubleSpinBoxSlopeScaleMax.value(),
+ ),
+ curvature_scale=(
+ self.ui.doubleSpinBoxCurvatureScaleMin.value(),
+ self.ui.doubleSpinBoxCurvatureScaleMax.value(),
+ ), # 曲率
+ )
# 入力・出力をUIで操作
input_path = self.ui.mQgsFileWidget_input.filePath()
@@ -45,8 +62,9 @@ def convert_dem_to_csmap(self):
process.process(
input_path,
output_path,
- chunk_size=256,
+ chunk_size=self.ui.spinBoxChunkSize.value(),
params=params,
+ max_workers=self.ui.spinBoxMaxWorkers.value(),
)
except Exception as e:
iface.messageBar().pushMessage(
diff --git a/dem_to_csmap.ui b/dem_to_csmap.ui
index 1981346..6c0f65b 100644
--- a/dem_to_csmap.ui
+++ b/dem_to_csmap.ui
@@ -6,63 +6,625 @@
0
0
- 389
- 191
+ 438
+ 625
Dialog
-
- -
-
-
- 入力レイヤ
-
-
-
- -
-
-
- -
-
-
- 出力レイヤ
-
-
-
- -
-
-
- -
-
-
- 処理終了後,自動でウィンドウを閉じる
-
-
-
- -
-
-
-
-
-
- Cancel
-
-
- false
-
-
-
- -
-
-
- Run
-
-
-
-
-
-
+
+
+
+ 12
+ 12
+ 63
+ 16
+
+
+
+ 入力レイヤ
+
+
+ Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft
+
+
+
+
+
+ 12
+ 37
+ 406
+ 22
+
+
+
+
+
+
+ 12
+ 530
+ 253
+ 20
+
+
+
+ true
+
+
+ 処理終了後,自動でウィンドウを閉じる
+
+
+
+ 20
+ 20
+
+
+
+
+
+
+ 12
+ 69
+ 63
+ 16
+
+
+
+ 出力レイヤ
+
+
+ Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft
+
+
+
+
+
+ 12
+ 93
+ 406
+ 22
+
+
+
+
+
+
+ 205
+ 585
+ 100
+ 25
+
+
+
+
+ 135
+ 30
+
+
+
+ Cancel
+
+
+ false
+
+
+
+
+
+ 12
+ 125
+ 230
+ 391
+
+
+
+ Options
+
+
+
+
+ 10
+ 25
+ 150
+ 20
+
+
+
+
+ 0
+ 0
+
+
+
+ gaussian filter size
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+
+
+
+ 150
+ 25
+ 70
+ 20
+
+
+
+ Qt::LeftToRight
+
+
+ Qt::AlignCenter
+
+
+ 1
+
+
+ 100
+
+
+ 12
+
+
+
+
+
+ 150
+ 55
+ 70
+ 20
+
+
+
+ Qt::AlignCenter
+
+
+ 1
+
+
+ 100
+
+
+ 3
+
+
+
+
+
+ 10
+ 55
+ 150
+ 20
+
+
+
+ gaussian filter sigma
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+
+
+
+ 10
+ 85
+ 150
+ 20
+
+
+
+ curvature filter size
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+
+
+
+ 150
+ 85
+ 70
+ 20
+
+
+
+ Qt::AlignCenter
+
+
+ 1
+
+
+ 100
+
+
+
+
+
+ 10
+ 110
+ 150
+ 20
+
+
+
+ height scale
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+
+
+
+ 120
+ 110
+ 30
+ 20
+
+
+
+ min
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+
+
+
+ 120
+ 135
+ 30
+ 20
+
+
+
+ max
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+
+
+
+ 150
+ 285
+ 70
+ 20
+
+
+
+ Qt::AlignCenter
+
+
+ 10000
+
+
+ 256
+
+
+ 1024
+
+
+
+
+
+ 10
+ 285
+ 150
+ 20
+
+
+
+ chunk size as pixel
+
+
+
+
+
+ 10
+ 160
+ 150
+ 20
+
+
+
+ slope scale
+
+
+
+
+
+ 120
+ 160
+ 50
+ 20
+
+
+
+
+ 0
+ 0
+
+
+
+
+ 50
+ 20
+
+
+
+ min
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+
+
+
+ 120
+ 185
+ 50
+ 20
+
+
+
+
+ 0
+ 0
+
+
+
+
+ 50
+ 20
+
+
+
+ max
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+
+
+
+ 150
+ 160
+ 70
+ 20
+
+
+
+ Qt::AlignCenter
+
+
+ 1
+
+
+ 100.000000000000000
+
+
+ 0.500000000000000
+
+
+
+
+
+ 150
+ 185
+ 70
+ 20
+
+
+
+ Qt::AlignCenter
+
+
+ 1
+
+
+ 100.000000000000000
+
+
+ 0.500000000000000
+
+
+ 1.500000000000000
+
+
+
+
+
+ 10
+ 210
+ 150
+ 20
+
+
+
+ curvature scale
+
+
+
+
+
+ 120
+ 210
+ 30
+ 20
+
+
+
+ min
+
+
+
+
+
+ 120
+ 235
+ 30
+ 20
+
+
+
+ max
+
+
+
+
+
+ 150
+ 210
+ 70
+ 20
+
+
+
+ Qt::AlignCenter
+
+
+ 1
+
+
+ -100.000000000000000
+
+
+ 100.000000000000000
+
+
+ 0.100000000000000
+
+
+ -0.100000000000000
+
+
+
+
+
+ 150
+ 235
+ 70
+ 20
+
+
+
+ Qt::AlignCenter
+
+
+ 1
+
+
+ -100.000000000000000
+
+
+ 100.000000000000000
+
+
+ 0.100000000000000
+
+
+ 0.100000000000000
+
+
+
+
+
+ 10
+ 335
+ 210
+ 16
+
+
+
+ max workers for multiprocessing
+
+
+
+
+
+ 150
+ 360
+ 70
+ 20
+
+
+
+ Qt::AlignCenter
+
+
+ 1
+
+
+
+
+
+ 150
+ 110
+ 70
+ 20
+
+
+
+ Qt::AlignCenter
+
+
+ 10000
+
+
+ 100
+
+
+
+
+
+ 150
+ 135
+ 70
+ 20
+
+
+
+ Qt::AlignCenter
+
+
+ 10000
+
+
+ 100
+
+
+ 1000
+
+
+
+
+
+
+ 315
+ 585
+ 100
+ 25
+
+
+
+
+ 135
+ 30
+
+
+
+ Run
+
+