Commit 39362c27 authored by PIERSON Julie's avatar PIERSON Julie
Browse files

cleaning comments

parent 5489b9c6
...@@ -80,13 +80,8 @@ class RenameBandsAlgorithm(QgsProcessingAlgorithm): ...@@ -80,13 +80,8 @@ class RenameBandsAlgorithm(QgsProcessingAlgorithm):
Here is where the processing itself takes place. Here is where the processing itself takes place.
""" """
# Retrieve the feature source and sink. The 'dest_id' variable is used # Retrieve inputs and outputs
# to uniquely identify the feature sink, and must be included in the
# dictionary returned by the processAlgorithm function.
input_raster = self.parameterAsRasterLayer(parameters, self.INPUT, context) input_raster = self.parameterAsRasterLayer(parameters, self.INPUT, context)
# (sink, dest_id) = self.parameterAsSink(parameters, self.OUTPUT,
# context, source.fields(), source.wkbType(), source.sourceCrs())
output_path_raster = self.parameterAsOutputLayer(parameters, self.OUTPUT, context) output_path_raster = self.parameterAsOutputLayer(parameters, self.OUTPUT, context)
param_translate = {'INPUT': input_raster, param_translate = {'INPUT': input_raster,
...@@ -95,18 +90,11 @@ class RenameBandsAlgorithm(QgsProcessingAlgorithm): ...@@ -95,18 +90,11 @@ class RenameBandsAlgorithm(QgsProcessingAlgorithm):
'COPY_SUBDATASETS':False, 'COPY_SUBDATASETS':False,
'OPTIONS':'', 'OPTIONS':'',
'EXTRA':'','DATA_TYPE':0, 'EXTRA':'','DATA_TYPE':0,
#'OUTPUT':'TEMPORARY_OUTPUT',
'OUTPUT':output_path_raster 'OUTPUT':output_path_raster
} }
processing.run("gdal:translate", param_translate) processing.run("gdal:translate", param_translate)
# Return the results of the algorithm. In this case our only result is # Return the results of the algorithm as a dictionary
# the feature sink which contains the processed features, but some
# algorithms may return multiple feature sinks, calculated numeric
# statistics, etc. These should all be included in the returned
# dictionary, with keys matching the feature corresponding parameter
# or output names.
# return {self.OUTPUT: dest_id}
return {self.OUTPUT: output_path_raster} return {self.OUTPUT: output_path_raster}
def name(self): def name(self):
......
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