[GRASS-SVN] r65031 - grass-addons/grass7/raster/r.green/r.green.biomassfor/r.green.biomassfor.technical
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Apr 9 06:06:08 PDT 2015
Author: osfraid
Date: 2015-04-09 06:06:08 -0700 (Thu, 09 Apr 2015)
New Revision: 65031
Modified:
grass-addons/grass7/raster/r.green/r.green.biomassfor/r.green.biomassfor.technical/r.green.biomassfor.technical.html
grass-addons/grass7/raster/r.green/r.green.biomassfor/r.green.biomassfor.technical/r.green.biomassfor.technical.py
Log:
add new version of r.green.biomassfor.technical and html file
Modified: grass-addons/grass7/raster/r.green/r.green.biomassfor/r.green.biomassfor.technical/r.green.biomassfor.technical.html
===================================================================
--- grass-addons/grass7/raster/r.green/r.green.biomassfor/r.green.biomassfor.technical/r.green.biomassfor.technical.html 2015-04-09 13:05:30 UTC (rev 65030)
+++ grass-addons/grass7/raster/r.green/r.green.biomassfor/r.green.biomassfor.technical/r.green.biomassfor.technical.html 2015-04-09 13:06:08 UTC (rev 65031)
@@ -0,0 +1,122 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>GRASS GIS manual: r.green.biomassfor.technical.py</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link rel="stylesheet" href="grassdocs.css" type="text/css">
+</head>
+<body bgcolor="white">
+<div id="container">
+
+<a href="index.html"><img src="grass_logo.png" alt="GRASS logo"></a>
+<hr class="header">
+
+<h2>NOME</h2>
+<em><b>r.green.biomassfor.technical.py</b></em> - Estimates the quantity of woody biomass obtained from a forest surface where extraction is possible given a particular level of mechanisation
+<h2>PAROLE CHIAVE</h2>
+<h2>SINOPSI</h2>
+<div id="name"><b>r.green.biomassfor.technical.py</b><br></div>
+<b>r.green.biomassfor.technical.py --help</b><br>
+<div id="synopsis"><b>r.green.biomassfor.technical.py</b> [-<b>r</b>] <b>dtm</b>=<em>name</em> <b>forest</b>=<em>name</em> <b>yield1</b>=<em>name</em> <b>yield_surface</b>=<em>name</em> <b>management</b>=<em>name</em> <b>treatment</b>=<em>name</em> <b>forest_roads</b>=<em>name</em> <b>output_prefix</b>=<em>name</em> [<b>roughness</b>=<em>name</em>] [<b>rivers</b>=<em>name</em>] [<b>lakes</b>=<em>name</em>] <b>slp_min_cc</b>=<em>float</em> [<b>slp_max_cc</b>=<em>float</em>] [<b>dist_max_cc</b>=<em>float</em>] [<b>slp_max_fw</b>=<em>float</em>] [<b>dist_max_fw</b>=<em>float</em>] [<b>slp_max_cop</b>=<em>float</em>] [<b>dist_max_cop</b>=<em>float</em>] <b>energy_tops_hf</b>=<em>float</em> <b>energy_cormometric_vol_hf</b>=<em>float</em> <b>energy_tops_cop</b>=<em>float</em> [--<b>overwrite</b>] [--<b>help</b>] [--<b>verbose</b>] [--<b>quiet</b>] [--<b>ui</b>]
+</div>
+
+<div id="flags">
+<h3>Flag:</h3>
+<dl>
+<dt><b>-r</b></dt>
+<dd>Remove all operational maps</dd>
+
+<dt><b>--overwrite</b></dt>
+<dd>Permetti al file di output di sovrascrivere file esistenti</dd>
+<dt><b>--help</b></dt>
+<dd>Print usage summary</dd>
+<dt><b>--verbose</b></dt>
+<dd>Output verboso del modulo</dd>
+<dt><b>--quiet</b></dt>
+<dd>Output quieto del modulo</dd>
+<dt><b>--ui</b></dt>
+<dd>Force launching GUI dialog</dd>
+</dl>
+</div>
+
+<div id="parameters">
+<h3>Parametri:</h3>
+<dl>
+<dt><b>dtm</b>=<em>name</em> <b>[required]</b></dt>
+<dd>Name of Digital terrain model map</dd>
+
+<dt><b>forest</b>=<em>name</em> <b>[required]</b></dt>
+<dd>Name of vector parcel map</dd>
+<dd>Name of vector parcel map</dd>
+
+<dt><b>yield1</b>=<em>name</em> <b>[required]</b></dt>
+<dd>Map of forest yield (cubic meters)</dd>
+
+<dt><b>yield_surface</b>=<em>name</em> <b>[required]</b></dt>
+<dd>Map of stand surface (ha)</dd>
+
+<dt><b>management</b>=<em>name</em> <b>[required]</b></dt>
+<dd>Map of forest management (1: high forest, 2:coppice)</dd>
+
+<dt><b>treatment</b>=<em>name</em> <b>[required]</b></dt>
+<dd>Map of forest treatment (1: final felling, 2:thinning)</dd>
+
+<dt><b>forest_roads</b>=<em>name</em> <b>[required]</b></dt>
+<dd>Raster map of forest roads (0, 1)</dd>
+
+<dt><b>output_prefix</b>=<em>name</em> <b>[required]</b></dt>
+<dd>Prefix for technical bioenergy (HF,CC and total)</dd>
+
+<dt><b>roughness</b>=<em>name</em></dt>
+<dd>Name of roughness map</dd>
+
+<dt><b>rivers</b>=<em>name</em></dt>
+<dd>Raster map of rivers (0, 1)</dd>
+
+<dt><b>lakes</b>=<em>name</em></dt>
+<dd>Raster map of lakes (0, 1)</dd>
+
+<dt><b>slp_min_cc</b>=<em>float</em> <b>[required]</b></dt>
+<dd>Percent slope lower limit with Cable Crane</dd>
+<dd>Default: <em>30.</em></dd>
+
+<dt><b>slp_max_cc</b>=<em>float</em></dt>
+<dd>Percent slope higher limit with Cable Crane</dd>
+<dd>Default: <em>100.</em></dd>
+
+<dt><b>dist_max_cc</b>=<em>float</em></dt>
+<dd>Maximum distance with Cable Crane</dd>
+<dd>Default: <em>800.</em></dd>
+
+<dt><b>slp_max_fw</b>=<em>float</em></dt>
+<dd>Percent slope higher limit with Forwarder</dd>
+<dd>Default: <em>30.</em></dd>
+
+<dt><b>dist_max_fw</b>=<em>float</em></dt>
+<dd>Maximum distance with Forwarder</dd>
+<dd>Default: <em>600.</em></dd>
+
+<dt><b>slp_max_cop</b>=<em>float</em></dt>
+<dd>Percent slope higher limit with other techniques for Coppices</dd>
+<dd>Default: <em>30.</em></dd>
+
+<dt><b>dist_max_cop</b>=<em>float</em></dt>
+<dd>Maximum distance with other techniques for Coppices</dd>
+<dd>Default: <em>600.</em></dd>
+
+<dt><b>energy_tops_hf</b>=<em>float</em> <b>[required]</b></dt>
+<dd>Energy for tops and branches in high forest in MWh/m³</dd>
+<dd>Default: <em>0.49</em></dd>
+
+<dt><b>energy_cormometric_vol_hf</b>=<em>float</em> <b>[required]</b></dt>
+<dd>Energy for the whole tree in high forest (tops, branches and stem) in MWh/m³</dd>
+<dd>Default: <em>1.97</em></dd>
+
+<dt><b>energy_tops_cop</b>=<em>float</em> <b>[required]</b></dt>
+<dd>Energy for tops and branches for Coppices in MWh/m³</dd>
+<dd>Default: <em>0.55</em></dd>
+
+</dl>
+</div>
+</body>
+</html>
Modified: grass-addons/grass7/raster/r.green/r.green.biomassfor/r.green.biomassfor.technical/r.green.biomassfor.technical.py
===================================================================
--- grass-addons/grass7/raster/r.green/r.green.biomassfor/r.green.biomassfor.technical/r.green.biomassfor.technical.py 2015-04-09 13:05:30 UTC (rev 65030)
+++ grass-addons/grass7/raster/r.green/r.green.biomassfor/r.green.biomassfor.technical/r.green.biomassfor.technical.py 2015-04-09 13:06:08 UTC (rev 65031)
@@ -99,13 +99,6 @@
#% required : no
#% guisection: Opt files
#%end
-#%option G_OPT_R_INPUT
-#% key: mmfeatures
-#% type: string
-#% description: Raster map of morphometric features
-#% required : no
-#% guisection: Opt files
-#%end
#%option
#% key: slp_min_cc
#% type: double
@@ -198,15 +191,10 @@
import numpy as np
-
-#CCEXTR = 'cable_crane_extraction = if(yield>0 && slope>%f && slope<=%f && extr_dist<%f, 1)'
-#FWEXTR = 'forwarder_extraction = if(yield>0 && slope<=%f && management==1 && (roughness==0 || roughness==1 || roughness==99999) && extr_dist<%f, 1)'
-#OEXTR = 'other_extraction = if(yield>0 && slope<=%f && management==2 && (roughness==0 || roughness==1 || roughness==99999) && extr_dist<%f, 1)'
YPIX = 'yield_pix = yield_pix1*%d + yield_pix2*%d'
-#EHF = 'technical_bioenergyHF = technical_surface*(if(management==1 && treatment==1 || management==1 && treatment==99999, yield_pix*%f, if(management==1 && treatment==2, yield_pix * %f + yield_pix * %f)))'
-#ECC = 'technical_bioenergyC = technical_surface*(if(management == 2, yield_pix*%f))'
+
def remove_map(opts, flgs):
@@ -238,7 +226,6 @@
rivers=opts['rivers']
lakes=opts['lakes']
- mmfeatures=opts['mmfeatures']
vector_forest=opts['forest']
@@ -266,17 +253,18 @@
run_command("r.param.scale", overwrite=ow,
input=opts['dtm'], output="morphometric_features",
- size=3, param="feature")
+ size=3, method="feature")
run_command("r.slope.aspect", overwrite=ow,
elevation=opts['dtm'], slope="slope_deg")
run_command("r.mapcalc", overwrite=ow,
expression='pix_cross = ((ewres()+nsres())/2)/ cos(slope_deg)')
run_command("r.mapcalc", overwrite=ow,expression='yield_pix1 = ('+yield_+'/'+yield_surface+')*((ewres()*nsres())/10000)')
run_command("r.null", map="yield_pix1", null=0)
+ run_command("r.null", map="morphometric_features", null=0)
- exprmap='frict_surf_extr = pix_cross + if(yield_pix1<=0, 99999)'
+ exprmap='frict_surf_extr = pix_cross + if(yield_pix1<=0, 99999) + if(morphometric_features==6, 99999)'
if rivers!='':
run_command("r.null", map=rivers, null=0)
@@ -286,17 +274,8 @@
run_command("r.null", map=lakes, null=0)
exprmap+='+ if('+lakes+'>=1, 99999)'
- if mmfeatures!='':
- exprmap+='+ if('+mmfeatures+'==6, 99999)'
- run_command("r.null", map=mmfeatures, null=0)
-
- #check the result of command
-
- #test=run_command("r.null", map="rivers", null=0)
-
- #print "risultato "+str(test)
#morphometric_features==6 -> peaks
#run_command("r.mapcalc", overwrite=ow,expression='frict_surf_extr = if(morphometric_features==6, 99999) + if(rivers>=1 || lakes>=1, 99999) + if(yield_pix1<=0, 99999) + pix_cross')
run_command("r.mapcalc", overwrite=ow,expression=exprmap)
@@ -305,6 +284,7 @@
input="frict_surf_extr", output="extr_dist",
stop_points=vector_forest, start_rast=forest_roads,
max_cost=1500)
+
run_command("r.slope.aspect", overwrite=ow,
elevation=opts['dtm'], slope="slope", format="percent")
run_command("r.mapcalc", overwrite=ow,expression=CCEXTR)
More information about the grass-commit
mailing list