Skip to content

Commit

Permalink
Merge pull request #26 from MIERUNE/feature/set-params
Browse files Browse the repository at this point in the history
  • Loading branch information
Kanahiro authored Jun 12, 2024
2 parents fc27a8e + ef328d6 commit 870be22
Show file tree
Hide file tree
Showing 2 changed files with 634 additions and 54 deletions.
22 changes: 20 additions & 2 deletions dem_to_csmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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(
Expand Down
Loading

0 comments on commit 870be22

Please sign in to comment.