Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
modified grass postprocessing and edited grass description
  • Loading branch information
volaya committed Jan 12, 2013
1 parent d5db373 commit 59b1d8d
Show file tree
Hide file tree
Showing 15 changed files with 108 additions and 108 deletions.
6 changes: 3 additions & 3 deletions python/plugins/sextante/grass/description/r.neighbors.txt
@@ -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
2 changes: 1 addition & 1 deletion python/plugins/sextante/grass/description/r.quant.txt
Expand Up @@ -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
6 changes: 3 additions & 3 deletions python/plugins/sextante/grass/description/r.quantile.txt
Expand Up @@ -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
37 changes: 37 additions & 0 deletions python/plugins/sextante/grass/ext/HtmlReportPostProcessor.py
@@ -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()

14 changes: 4 additions & 10 deletions python/plugins/sextante/grass/ext/r_coin.py
Expand Up @@ -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)

15 changes: 5 additions & 10 deletions python/plugins/sextante/grass/ext/r_covar.py
Expand Up @@ -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)


13 changes: 3 additions & 10 deletions python/plugins/sextante/grass/ext/r_describe.py
Expand Up @@ -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)

13 changes: 3 additions & 10 deletions python/plugins/sextante/grass/ext/r_info.py
Expand Up @@ -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)

29 changes: 29 additions & 0 deletions python/plugins/sextante/grass/ext/r_quantile.py
@@ -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)

14 changes: 4 additions & 10 deletions python/plugins/sextante/grass/ext/r_regression_line.py
Expand Up @@ -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)


13 changes: 3 additions & 10 deletions python/plugins/sextante/grass/ext/v_class.py
Expand Up @@ -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)

13 changes: 3 additions & 10 deletions python/plugins/sextante/grass/ext/v_info.py
Expand Up @@ -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)

14 changes: 4 additions & 10 deletions python/plugins/sextante/grass/ext/v_normal.py
Expand Up @@ -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)


13 changes: 3 additions & 10 deletions python/plugins/sextante/grass/ext/v_report.py
Expand Up @@ -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)

14 changes: 3 additions & 11 deletions python/plugins/sextante/grass/ext/v_univar.py
Expand Up @@ -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.