Skip to content
Permalink
Browse files
modified grass postprocessing and edited grass description
  • Loading branch information
volaya committed Jan 12, 2013
1 parent d5db373 commit 59b1d8d0cc0df52906ff5a947aadc1ce0ff0a5b8
@@ -1,10 +1,10 @@
r.neighbors
r.neighbors - Makes each cell category value a function of the category values assigned to the cells around it, and stores new cell values in an output raster map layer.
Raster (r.*)
ParameterRaster|input|Name of input raster map|False
ParameterRaster|input|Input raster layer|False
ParameterSelection|method|Neighborhood operation|average;median;mode;minimum;maximum;stddev;sum;variance;diversity;interspersion
ParameterNumber|size|Neighborhood size|1.0|None|3
ParameterNumber|size|Neighborhood size|1|None|3
ParameterBoolean|-c|Use circular neighborhood|False
*ParameterBoolean|-a|Do not align output with the input|False
*ParameterFile|weight|File containing weights|False
OutputRaster|output|Name for output raster map
OutputRaster|output|Output layer
@@ -6,4 +6,4 @@ ParameterRaster|basemap|Base map to take quant rules from|False
ParameterRange|fprange|Floating point range: dmin,dmax|0,1
ParameterRange|range|Integer range: min,max|1,255
ParameterBoolean|-t|Truncate floating point data|False
ParameterBoolean|-r|Round floating point data|False
ParameterBoolean|-r|Round floating point data|False
@@ -2,6 +2,6 @@ r.quantile
r.quantile - Compute quantiles using two passes.
Raster (r.*)
ParameterRaster|input|Name of input raster map|False
ParameterNumber|quantiles|Number of quantiles|2.0|None|4
ParameterString|percentiles|List of percentiles|
ParameterBoolean|-r|Generate recode rules based on quantile-defined intervals|False
ParameterNumber|quantiles|Number of quantiles|2|None|4
*ParameterBoolean|-r|Generate recode rules based on quantile-defined intervals|False
OutputHTML|html|Output report
@@ -0,0 +1,37 @@
# -*- coding: utf-8 -*-

"""
***************************************************************************
HtmlReportPostProcessor.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$'

def postProcessResults(alg):
htmlFile = alg.getOutputFromName('html').value
grassName = alg.grassName
found = False
f = open(htmlFile, "w")
f.write("<h2>" + grassName + "</h2>\n")
for line in alg.consoleOutput:
if found and not line.strip().endswith('exit'):
f.write(line + "<br>\n")
if grassName in line and not line.startswith("GRASS"):
found = True
f.close()

@@ -16,21 +16,15 @@
* *
***************************************************************************
"""

__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):
htmlFile = alg.getOutputFromName('html').value
found = False
f = open(htmlFile, "w")
f.write("<h2>r.coin</h2>\n")
for line in alg.consoleOutput:
if found and not line.strip().endswith('exit'):
f.write(line + "<br>\n")
if 'r.coin' in line:
found = True
f.close()
HtmlReportPostProcessor.postProcessResults(alg)

@@ -22,15 +22,10 @@
# 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):
htmlFile = alg.getOutputFromName('html').value
found = False
f = open(htmlFile, "w")
f.write("<h2>r.covar</h2>\n")
for line in alg.consoleOutput:
if found and not line.strip().endswith('exit'):
f.write(line + "<br>\n")
if 'r.covar' in line:
found = True
f.close()
HtmlReportPostProcessor.postProcessResults(alg)


@@ -22,15 +22,8 @@
# 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):
htmlFile = alg.getOutputFromName('html').value
found = False
f = open(htmlFile, "w")
f.write("<h2>r.describe</h2>\n")
for line in alg.consoleOutput:
if found and not line.strip().endswith('exit'):
f.write(line + "<br>\n")
if 'r.describe' in line:
found = True
f.close()
HtmlReportPostProcessor.postProcessResults(alg)

@@ -22,15 +22,8 @@
# 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):
htmlFile = alg.getOutputFromName('html').value
found = False
f = open(htmlFile, "w")
f.write("<h2>r.info</h2>\n")
for line in alg.consoleOutput:
if found and not line.strip().endswith('exit'):
f.write(line + "<br>\n")
if 'r.info' in line:
found = True
f.close()
HtmlReportPostProcessor.postProcessResults(alg)

@@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-

"""
***************************************************************************
r_quantile.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)

@@ -22,15 +22,9 @@
# 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):
htmlFile = alg.getOutputFromName('html').value
found = False
f = open(htmlFile, "w")
f.write("<h2>r.regresion.line</h2>\n")
for line in alg.consoleOutput:
if found and not line.strip().endswith('exit'):
f.write(line + "<br>\n")
if 'r.regression.line' in line:
found = True
f.close()
HtmlReportPostProcessor.postProcessResults(alg)


@@ -22,15 +22,8 @@
# 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):
htmlFile = alg.getOutputFromName('html').value
found = False
f = open(htmlFile, "w")
f.write("<h2>v.class</h2>\n")
for line in alg.consoleOutput:
if found and not line.strip().endswith('exit'):
f.write(line + "<br>\n")
if 'v.class' in line:
found = True
f.close()
HtmlReportPostProcessor.postProcessResults(alg)

@@ -22,15 +22,8 @@
# 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):
htmlFile = alg.getOutputFromName('html').value
found = False
f = open(htmlFile, "w")
f.write("<h2>v.info</h2>\n")
for line in alg.consoleOutput:
if found and not line.strip().endswith('exit'):
f.write(line + "<br>\n")
if 'v.info' in line:
found = True
f.close()
HtmlReportPostProcessor.postProcessResults(alg)

@@ -22,15 +22,9 @@
# 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):
htmlFile = alg.getOutputFromName('html').value
found = False
f = open(htmlFile, "w")
f.write("<h2>v.normal</h2>\n")
for line in alg.consoleOutput:
if found and not line.strip().endswith('exit'):
f.write(line + "<br>\n")
if 'v.normal' in line:
found = True
f.close()
HtmlReportPostProcessor.postProcessResults(alg)


@@ -22,15 +22,8 @@
# 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):
htmlFile = alg.getOutputFromName('html').value
found = False
f = open(htmlFile, "w")
f.write("<h2>v.report</h2>\n")
for line in alg.consoleOutput:
if found and not line.strip().endswith('exit'):
f.write(line + "<br>\n")
if 'v.report' in line:
found = True
f.close()
HtmlReportPostProcessor.postProcessResults(alg)

@@ -22,15 +22,7 @@
# 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):
htmlFile = alg.getOutputFromName('html').value
found = False
f = open(htmlFile, "w")
f.write("<h2>v.univar</h2>\n")
for line in alg.consoleOutput:
if found and not line.strip().endswith('exit'):
f.write(line + "<br>\n")
if 'v.univar' in line:
found = True
f.close()

HtmlReportPostProcessor.postProcessResults(alg)

0 comments on commit 59b1d8d

Please sign in to comment.