[GRASS-SVN] r65061 - grass-addons/grass7/raster/r.meb

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Apr 15 08:54:15 PDT 2015


Author: pvanbosgeo
Date: 2015-04-15 08:54:15 -0700 (Wed, 15 Apr 2015)
New Revision: 65061

Modified:
   grass-addons/grass7/raster/r.meb/r.meb.html
   grass-addons/grass7/raster/r.meb/r.meb.py
Log:
added rule to force user to select method to compute MES. Added example to html page

Modified: grass-addons/grass7/raster/r.meb/r.meb.html
===================================================================
--- grass-addons/grass7/raster/r.meb/r.meb.html	2015-04-15 15:10:14 UTC (rev 65060)
+++ grass-addons/grass7/raster/r.meb/r.meb.html	2015-04-15 15:54:15 UTC (rev 65061)
@@ -3,13 +3,13 @@
 <p>The Multivariate Environmental Bias (MEB) takes the medium 
 conditions in an area <em>N</em> and computes how much conditions in 
 a subset of <em>N </em> (<em>S</em>) deviate from these medium 
-conditions (van Breugel et al. 2015). This can for example be used to see how well conditions 
-in the protected areas of a country represent conditions in the 
-whole country.
+conditions (van Breugel et al. 2015). This can for example be used to 
+see how well conditions in the protected areas of a country represent 
+conditions in the whole country.
 
 <p>The messure is based on the Multivariate Environmental Similarity 
 (<em>MES</em>) surface, which was proposed by Elith et al (2015). To compute 
-the MES First the similarity of a point <em>P</em> to the conditions 
+the MES first the similarity of a point <em>P</em> to the conditions 
 in <em>N</em> with respect to variable <em>V</em> is computed. The 
 similarity is expressed as the deviation from the median of <em>V</em> 
 in <em>P</em> to those in <em>N</em>. This is done for all variables of 
@@ -21,7 +21,7 @@
 variables (<em>V<sub>j</sub></em>) in <em>P</em>. In <em>r.eb</em> 
 there is the option to use the mean (<em>IES<sub>mean</sub></em>) or 
 median (<em>IES<sub>median</sub></em>) of the <em>IES</em> instead. 
-For the MEB these may be a better choice as they take into account 
+For the <em>MEB</em> these may be a better choice as they take into account 
 the similarity along all environmnetal axes and not only the one 
 that deviates most. 
 
@@ -36,6 +36,15 @@
 
 <p><img src="r_meb_concept.png">
 
+<p>The addon creates a MES layer and a table (saved to csv file) 
+with the median value of each variable in the region and in the 
+reference area, the median absolute deviation (mad) and the 
+environmental bias (eb). Optionally, this can be computed for the 
+individual variables as well. The user has the option to have the 
+addon compute the <em>MEB</em> based on the <em>MES
+</em> computed using the minimum, average and/or median of the IES layers 
+(see above)
+    
 <h2>NOTE</h2>
 <p>Input variables are expected to be or to represent continuous variables. 
 
@@ -46,6 +55,30 @@
 Eastern Africa. PLoS ONE 10(4): e0121444. 
 doi: 10.1371/journal.pone.0121444 
 
+<h2>Example</h2>
+<p>In the example below the <em>MEB</em> for a map 'forestmap' which 
+gives the distribution of forest (1) and other land cover types (0).
+As environmental variables, the bio1, bio3 and bio9 are used. 
+
+<div class="code"><pre>r.meb -m -n -o env=bio_1,bio_3,bio_9 
+ref=forestmap output=test file=test.csv
+Median test_MES_mean (all region) = 51.257
+Median test_MES_mean (ref. area) = 30.919
+MAD test_MES_mean (all region) = 24.272
+EB = 0.838
+Median test_MES_median (all region) = 51.257
+Median test_MES_median (ref. area) = 30.919
+MAD test_MES_median (all region) = 24.272
+EB = 0.838
+Median test_MES_minimum (all region) = 43.651
+Median test_MES_minimum (ref. area) = 24.735
+MAD test_MES_minimum (all region) = 22.685
+EB = 0.834
+
+The results are written to test.csv
+</pre></div<
+
+
 <h2>REFERENCES</h2> 
 
 <p>Elith, J., Kearney, M., and Phillips, S. 

Modified: grass-addons/grass7/raster/r.meb/r.meb.py
===================================================================
--- grass-addons/grass7/raster/r.meb/r.meb.py	2015-04-15 15:10:14 UTC (rev 65060)
+++ grass-addons/grass7/raster/r.meb/r.meb.py	2015-04-15 15:54:15 UTC (rev 65061)
@@ -99,6 +99,10 @@
 #% guisection: Output
 #%end
 
+#%rules
+#% required: -m,-n,-o
+#%end
+
 #%option
 #% key: digits
 #% type: integer



More information about the grass-commit mailing list