Commit d02cc267 authored by Gaetano Raffaele's avatar Gaetano Raffaele
Browse files

WIP: complete refactoring of stratification application.

parent 36bf0caa
......@@ -17,7 +17,7 @@ from qgis.core import (QgsProcessingAlgorithm,
QgsProcessingParameterFile,
QgsProcessingParameterString,
QgsProcessingParameterNumber,
QgsProcessingParameterVectorLayer,
QgsProcessingParameterRasterDestination,
QgsProcessingContext)
from qgis import processing
import os
......@@ -226,9 +226,9 @@ class LandscapeStratification(QgsProcessingAlgorithm):
defaultValue=5))
self.addParameter(
QgsProcessingParameterFolderDestination(
QgsProcessingParameterRasterDestination(
self.OUTPUT,
self.tr('Output folder')
self.tr('Output landscape stratification metric')
)
)
......@@ -246,12 +246,14 @@ class LandscapeStratification(QgsProcessingAlgorithm):
context
)
output_folder = self.parameterAsString(
output_raster = self.parameterAsString(
parameters,
self.OUTPUT,
context
)
output_folder = os.path.dirname(output_raster)
prefix = parameters['PREFIX'] if parameters['PREFIX'] != None else ''
if len(prefix)>0 and prefix[-1] != '_':
prefix+='_'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment