Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Médéric Ribreux
authored and
Médéric RIBREUX
committed
May 29, 2016
1 parent
90758b5
commit 8ff07cf
Showing
4 changed files
with
71 additions
and
4 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
python/plugins/processing/algs/grass7/description/i.landsat.acca.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
i.landsat.acca | ||
Performs Landsat TM/ETM+ Automatic Cloud Cover Assessment (ACCA). | ||
Imagery (i.*) | ||
ParameterMultipleInput|rasters|Landsat input rasters|3|False | ||
ParameterNumber|b56composite|B56composite (step 6)|0|None|225|True | ||
ParameterNumber|b45ratio|B45ratio: Desert detection (step 10)|0|None|1|True | ||
ParameterNumber|histogram|Number of classes in the cloud temperature histogram|0|None|100|True | ||
*ParameterBoolean|-5|Data is Landsat-5 TM|False | ||
*ParameterBoolean|-f|Apply post-processing filter to remove small holes|False | ||
*ParameterBoolean|-x|Always use cloud signature (step 14)|False | ||
*ParameterBoolean|-2|Bypass second-pass processing, and merge warm (not ambiguous) and cold clouds|False | ||
*ParameterBoolean|-s|Include a category for cloud shadows|False | ||
OutputRaster|output|ACCA Raster | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
python/plugins/processing/algs/grass7/ext/i_landsat_acca.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
""" | ||
*************************************************************************** | ||
i_landsat_acca.py | ||
----------------- | ||
Date : March 2016 | ||
Copyright : (C) 2016 by Médéric Ribreux | ||
Email : medspx at medspx dot fr | ||
*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
*************************************************************************** | ||
""" | ||
|
||
__author__ = 'Médéric Ribreux' | ||
__date__ = 'March 2016' | ||
__copyright__ = '(C) 2016, Médéric Ribreux' | ||
|
||
# This will get replaced with a git SHA1 when you do a git archive | ||
|
||
__revision__ = '$Format:%H$' | ||
|
||
from i import verifyRasterNum, orderedInput | ||
|
||
|
||
def checkParameterValuesBeforeExecuting(alg): | ||
return verifyRasterNum(alg, 'rasters', 5, 5) | ||
|
||
|
||
def processInputs(alg): | ||
orderedInput(alg, 'rasters', | ||
"ParameterString|input|Base name of input raster bands|None|False|False", | ||
[2, 3, 4, 5, 61]) | ||
|
||
|
||
def processCommand(alg): | ||
# Remove rasters parameter | ||
rasters = alg.getParameterFromName('rasters') | ||
alg.parameters.remove(rasters) | ||
|
||
alg.processCommand() | ||
|
||
# re-add rasters | ||
alg.addParameter(rasters) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters