mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Add i.topo.corr algorithm
This commit is contained in:
parent
cce451c722
commit
5182748e10
@ -0,0 +1,8 @@
|
||||
i.topo.corr
|
||||
i.topo.coor.ill - Creates illumination model for topographic correction of reflectance.
|
||||
Imagery (i.*)
|
||||
ParameterRaster|basemap|Name of elevation raster map|False
|
||||
ParameterNumber|zenith|Solar zenith in degrees|0.0|360.0|0.0|False
|
||||
ParameterNumber|azimuth|Solar azimuth in degrees|0.0|360.0|0.0|False
|
||||
Hardcoded|-i
|
||||
OutputRaster|output|Illumination Model
|
@ -0,0 +1,9 @@
|
||||
i.topo.corr
|
||||
Computes topographic correction of reflectance.
|
||||
Imagery (i.*)
|
||||
ParameterMultipleInput|input|Name of reflectance raster maps to be corrected topographically|3|False
|
||||
ParameterRaster|basemap|Name of illumination input base raster map|False
|
||||
ParameterNumber|zenith|Solar zenith in degrees|0.0|360.0|0.0|False
|
||||
ParameterSelection|method|Topographic correction method|cosine;minnaert;c-factor;percent|0
|
||||
*ParameterBoolean|-s|Scale output to input and copy color rules|False
|
||||
OutputDirectory|output|Output Directory
|
52
python/plugins/processing/algs/grass7/ext/i_topo_corr.py
Normal file
52
python/plugins/processing/algs/grass7/ext/i_topo_corr.py
Normal file
@ -0,0 +1,52 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
***************************************************************************
|
||||
i_topo_corr.py
|
||||
--------------
|
||||
Date : April 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__ = 'April 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 multipleOutputDir, verifyRasterNum
|
||||
from processing.core.parameters import getParameterFromString
|
||||
|
||||
|
||||
def processCommand(alg):
|
||||
# Remove output
|
||||
output = alg.getOutputFromName('output')
|
||||
alg.removeOutputFromName('output')
|
||||
|
||||
# Create output parameter
|
||||
param = getParameterFromString("ParameterString|output|output basename|None|False|False")
|
||||
param.value = alg.getTempFilename()
|
||||
alg.addParameter(param)
|
||||
|
||||
alg.processCommand()
|
||||
# re-add output
|
||||
alg.addOutput(output)
|
||||
|
||||
|
||||
def processOutputs(alg):
|
||||
param = alg.getParameterFromName('output')
|
||||
multipleOutputDir(alg, 'output', param.value)
|
||||
|
||||
# Delete output parameter
|
||||
alg.parameters.remove(param)
|
Loading…
x
Reference in New Issue
Block a user