Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Docker-in-Docker (DinD) capabilities of public runners deactivated.
More info
Open sidebar
LETG
Rename bands
Commits
39362c27
Commit
39362c27
authored
Sep 10, 2021
by
PIERSON Julie
Browse files
cleaning comments
parent
5489b9c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
14 deletions
+2
-14
rename_bands_algorithm.py
rename_bands_algorithm.py
+2
-14
No files found.
rename_bands_algorithm.py
View file @
39362c27
...
...
@@ -80,13 +80,8 @@ class RenameBandsAlgorithm(QgsProcessingAlgorithm):
Here is where the processing itself takes place.
"""
# Retrieve the feature source and sink. The 'dest_id' variable is used
# to uniquely identify the feature sink, and must be included in the
# dictionary returned by the processAlgorithm function.
# Retrieve inputs and outputs
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
)
param_translate
=
{
'INPUT'
:
input_raster
,
...
...
@@ -95,18 +90,11 @@ class RenameBandsAlgorithm(QgsProcessingAlgorithm):
'COPY_SUBDATASETS'
:
False
,
'OPTIONS'
:
''
,
'EXTRA'
:
''
,
'DATA_TYPE'
:
0
,
#'OUTPUT':'TEMPORARY_OUTPUT',
'OUTPUT'
:
output_path_raster
}
processing
.
run
(
"gdal:translate"
,
param_translate
)
# Return the results of the algorithm. In this case our only result is
# 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 the results of the algorithm as a dictionary
return
{
self
.
OUTPUT
:
output_path_raster
}
def
name
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment