Skip to content
Permalink
Browse files

Merge pull request #677 from radosuav/r_report_fix

Save SEXTANTE GRASS r.report output in HTML
  • Loading branch information
volaya committed Jun 30, 2013
2 parents 92b930a + 7e00e7b commit 3d7f76a59f9393f14ea7188e1dddfa605a12a03d
@@ -1,13 +1,13 @@
r.report
r.report - Reports statistics for raster layers.
Raster (r.*)
ParameterMultipleInput|map|Raster layer(s) to report on|3.0|False
ParameterSelection|units|Units|mi;me;k;a;h;c;p
ParameterString|null|Character representing no data cell value|*
ParameterNumber|nsteps|Number of fp subranges to collect stats from|1|None|255
ParameterBoolean|-h|Suppress page headers|True
ParameterBoolean|-f|Use formfeeds between pages|True
ParameterBoolean|-e|Scientific format|True
ParameterBoolean|-n|Filter out all no data cells|True
ParameterBoolean|-N|Filter out cells where all layers have no data|True
OutputHTML|output|Output report file
r.report
r.report - Reports statistics for raster layers.
Raster (r.*)
ParameterMultipleInput|map|Raster layer(s) to report on|3.0|False
ParameterSelection|units|Units|mi;me;k;a;h;c;p
ParameterString|null|Character representing no data cell value|*
ParameterNumber|nsteps|Number of fp subranges to collect stats from|1|None|255
ParameterBoolean|-h|Suppress page headers|True
ParameterBoolean|-f|Use formfeeds between pages|True
ParameterBoolean|-e|Scientific format|True
ParameterBoolean|-n|Filter out all no data cells|True
ParameterBoolean|-N|Filter out cells where all layers have no data|True
OutputHTML|html|Output report file
@@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-

"""
***************************************************************************
r_report.py
---------------------
Date : December 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
***************************************************************************
* *
* 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__ = 'Victor Olaya'
__date__ = 'December 2012'
__copyright__ = '(C) 2012, Victor Olaya'
# This will get replaced with a git SHA1 when you do a git archive
__revision__ = '$Format:%H$'

from sextante.grass.ext import HtmlReportPostProcessor

def postProcessResults(alg):
HtmlReportPostProcessor.postProcessResults(alg)
@@ -138,10 +138,7 @@ def setParamValues(self):

for param in params:
if isinstance(param, ParameterExtent):
value = self.paramTable.valueItems[param.name].getValue()
if value is not None:
param.value = value
else:
if not self.setParamValue(param, self.paramTable.valueItems[param.name]):
raise AlgorithmExecutionDialog.InvalidParameterValue(param, self.paramTable.valueItems[param.name])

for output in outputs:

0 comments on commit 3d7f76a

Please sign in to comment.
You can’t perform that action at this time.