From 406c6a1515bb0b0dc2157d94a7aabf30a5eea3f8 Mon Sep 17 00:00:00 2001 From: Samuel Dunesme Date: Tue, 7 Jan 2025 17:32:52 +0100 Subject: [PATCH] Revert DetrendDEM float input --- .github/workflows/test-ubuntu.yml | 2 +- fct/algorithms/terrain/DetrendDEM.py | 2 +- fct/workflows/spatialcomponents/ValleyBottom.py | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-ubuntu.yml b/.github/workflows/test-ubuntu.yml index 8534d73a..860620d7 100644 --- a/.github/workflows/test-ubuntu.yml +++ b/.github/workflows/test-ubuntu.yml @@ -21,4 +21,4 @@ jobs: - uses: actions/checkout@v4 - name: Run tests run: | - xvfb-run -s '+extension GLX -screen 0 800x600x24' /usr/bin/python3 -m pytest -v + xvfb-run -s '+extension GLX -screen 0 1024x768x24' /usr/bin/python3 -m pytest -v diff --git a/fct/algorithms/terrain/DetrendDEM.py b/fct/algorithms/terrain/DetrendDEM.py index 91779637..c7c4baaf 100644 --- a/fct/algorithms/terrain/DetrendDEM.py +++ b/fct/algorithms/terrain/DetrendDEM.py @@ -37,7 +37,7 @@ class DetrendDEM(AlgorithmMetadata, QgsProcessingAlgorithm): def initAlgorithm(self, configuration): self.addParameter(QgsProcessingParameterRasterLayer('dem', 'Input DEM', defaultValue=None)) - self.addParameter(QgsProcessingParameterDistance('disaggregationdistance', 'Disaggregation Distance', parentParameterName='dem', defaultValue=None, type=QgsProcessingParameterDistance.Double)) + self.addParameter(QgsProcessingParameterDistance('disaggregationdistance', 'Disaggregation Distance', parentParameterName='dem', defaultValue=None)) self.addParameter(QgsProcessingParameterFeatureSource('stream', 'Stream network', types=[QgsProcessing.TypeVectorLine], defaultValue=None)) self.addParameter(QgsProcessingParameterRasterDestination('Detrended', 'Output detrended DEM', createByDefault=True, defaultValue=None)) diff --git a/fct/workflows/spatialcomponents/ValleyBottom.py b/fct/workflows/spatialcomponents/ValleyBottom.py index 32f7c046..78087ebd 100644 --- a/fct/workflows/spatialcomponents/ValleyBottom.py +++ b/fct/workflows/spatialcomponents/ValleyBottom.py @@ -71,8 +71,7 @@ def initAlgorithm(self, configuration): self.addParameter(QgsProcessingParameterNumber( self.STEP, self.tr('Disaggregation step (topological detrending only)'), - defaultValue=50.0, - type=QgsProcessingParameterNumber.Double, + defaultValue=50, minValue=1)) self.addParameter(QgsProcessingParameterNumber(