[GRASS-SVN] r58989 - in grass/branches/develbranch_6/raster/r.li: . r.li.setup

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Feb 11 01:44:37 PST 2014


Author: neteler
Date: 2014-02-11 01:44:37 -0800 (Tue, 11 Feb 2014)
New Revision: 58989

Modified:
   grass/branches/develbranch_6/raster/r.li/TODO
   grass/branches/develbranch_6/raster/r.li/r.li.setup/description.html
Log:
r.li.setup manual: moving window example added; some HTML cleanup

Modified: grass/branches/develbranch_6/raster/r.li/TODO
===================================================================
--- grass/branches/develbranch_6/raster/r.li/TODO	2014-02-11 01:56:09 UTC (rev 58988)
+++ grass/branches/develbranch_6/raster/r.li/TODO	2014-02-11 09:44:37 UTC (rev 58989)
@@ -4,11 +4,14 @@
 - add relevant references
 - use English variable names in C code
 
-Please change the examples to Spearfish wherever possible:
+Please change the examples to North Carolina wherever possible:
 
+
 # Spearfish
 g.region rast=landcover.30m -p
-r.mapcalc "forests=if(landcover.30m >= 41 && landcover.30m <=43,1,null())"
+r.mapcalc "forests = if(landcover.30m >= 41 && landcover.30m <= 43,1,null())"
+d.mon x0
+d.rast forests
 r.li.patchdensity forests conf=movwindow7 out=forests_p_dens7
 d.rast.leg forests_p_dens7
 
@@ -31,4 +34,8 @@
 max=19.841270
 # -> all cells are 19.841270 ?!
 
+---------
 
+Add example which results in an ASCII output file
+
+

Modified: grass/branches/develbranch_6/raster/r.li/r.li.setup/description.html
===================================================================
--- grass/branches/develbranch_6/raster/r.li/r.li.setup/description.html	2014-02-11 01:56:09 UTC (rev 58988)
+++ grass/branches/develbranch_6/raster/r.li/r.li.setup/description.html	2014-02-11 09:44:37 UTC (rev 58989)
@@ -14,27 +14,27 @@
 
 Definition of region for analysis:
 <ul>
-  <li> Whole map layer: entire map (current region),
-  <li> Keyboard setting: based on keyboard selection for region definition,
-  <li> Draw the sampling frame: based on interactive region selection via mouse.
+  <li> Whole map layer: entire map (current region),</li>
+  <li> Keyboard setting: based on keyboard selection for region definition,</li>
+  <li> Draw the sampling frame: based on interactive region selection via mouse.</li>
 </ul>
 
 Definition of creation of sampling area:
 <ul>
-  <li> Whole map layer: use entire area selected above,
-  <li> Regions: select one to many subareas via mouse,
-  <li> Sample units: automated selection of sampling area (for details see below)
+  <li> Whole map layer: use entire area selected above,</li>
+  <li> Regions: select one to many subareas via mouse,</li>
+  <li> Sample units: automated selection of sampling area (for details see below)</li>
 
   <ul>
-    <li> Random nonoverlapping,
-    <li> Systematic contiguous,
-    <li> Systematic noncontiguous,
-    <li> Stratified random,
-    <li> Centered over sites (vector points).
+    <li> Random nonoverlapping,</li>
+    <li> Systematic contiguous,</li>
+    <li> Systematic noncontiguous,</li>
+    <li> Stratified random,</li>
+    <li> Centered over sites (vector points).</li>
   </ul>
 
-  <li> Moving window: rectagular or circular with size
-  <li> Select areas from the overlaid vector map (for details see below)
+  <li> Moving window: rectangular or circular with size</li>
+  <li> Select areas from the overlaid vector map (for details see below)</li>
 </ul>
 
 <img src="sampleAreas.jpg" alt="Sampling area definition">
@@ -45,105 +45,153 @@
 The startup window shows your configuration files, you can: 
 
 <ol>
-  <li><em><b>Load a file</b></em>: the configuration is printed using 
-rectangles with differents colors (green for the raster map, 
-red for the sample 
-frame and blue for the sample areas), and other notes (disposition of 
-sample areas etc).
-The configuration file is saved in <tt>~/.r.li/history/my_conf</tt>
-(the file name can be defined by the user).
-<!-- NOT REALLY CLEAR: -->
-Configuration output files are raster if moving window disposition was
-selected, otherwise they are in <tt>~/.r.li/output</tt> folder.
-<br> 
-All dimension are percentage of raster rows or columns.
+<li><em><b>Load a file</b></em>: the configuration is printed using 
+ rectangles with differents colors (green for the raster map, red for 
+ the sample frame and blue for the sample areas), and other notes 
+ (disposition of sample areas etc). The configuration file is saved 
+ in <tt>~/.r.li/history/my_conf</tt> (the file name can be defined by 
+ the user). The output can either be a new raster map (in case of 
+ using a "moving window" analysis) or be an ASCII text file (when not 
+ performing a "moving window" analysis) containing the result which 
+ is then saved to the folder <tt>~/.r.li/output/</tt>.
+ <br>
+ <!-- TODO: applies to all output or only ASCII output?? -->
+ All dimensions are percentages of raster rows or columns.</li>
 
-  <li><em><b>Create a new file:</b></em> this create a new configuration 
-file in an interactive way, in three steps
+ <li><em><b>Create a new file:</b></em> this create a new configuration 
+ file in an interactive way, in three steps:</li>
 
   <ol> 
-     <li> Choose file name and maps to use for setting:
+     <li> Choose file name and maps to use for setting:</li>
 	<ul>
 	  <li> <em>Configuration file name </em>(required): the name
-	  of new configuration file
-	  <li> <em>Raster map name</em> (required): the name of raster
-	  map to use for setting
+	  of new configuration file</li>
+	  <li> <em>Raster map name to use to select areas</em> (required): the name of raster
+	  map to use for setting <!-- TODO: ... map to be analysed?? --></li>
 	  <li> <em>Vector areas map to overlay</em> (optional): name of a vector 
-	  map to overlay in setting
+	  map to overlay in setting</li>
 	  <li> <em>Vector points map to overlay</em> (optional): name of vector map 
-	  of points type to overlay in setting
+	  of points type to overlay in setting</li>
 	</ul>
 
      <li> Set the sampling frame. The sample frame is a rectangular area 
      which contains all the areas to analyze. It can be defined in three 
-     ways: 
+     ways: </li>
 	<ul>
-	   <li><em>Whole map layer</em>: the sample frame is the whole map
+	   <li><em>Whole map layer</em>: the sample frame is the whole map</li>
 	   <li><em>Keyboard setting</em>: the user enters the coordinates in
 	   cells of upper left corner of sampling frame and its length in
-	   rows and columns.
+	   rows and columns.</li>
 	   <li><em>Draw the sample frame</em>: the user draws the sample frame
-	   on map using mouse.
+	   on map using mouse.</li>
 	</ul>
 
      <li> Set the sample areas. The sample areas are simply the areas to 
-       analyze. They can be defined in five ways (see the picture below):
+       analyze. They can be defined in five ways (see the picture below):</li>
 	<ul>
 	  <li><em>Whole map layer</em>: the sample area is the whole sample 
-	  frame
+	  frame</li>
 	  <li><em>Regions</em>: the user enters the number of areas and then 
-	  draws them using mouse. 
+	  draws them using mouse.</li> 
 	  <li><em>Sample units</em>: they are areas of rectangular or circular 
-	  shape. The user can define them using keyboard or mouse.
+	  shape. The user can define them using keyboard or mouse.</li>
 
 	   <ul>
 	      <li>keyboard: the user define the shape of sample unists and 
-	      their disposition: 
+	      their disposition:</li>
 	          <ul>
 		    <li><em>Random non overlapping</em>: the user specifies 
 		  the number of sample units and they are placed in a 
-		  random way at runtime. It is guaranted that the 
-		  areas do not intersect themselfs.
+		  random way at runtime. It is guaranteed that the 
+		  areas do not intersect themselves.</li>
 		    <li><em>Systematic contiguous</em>: the defined sample
 		  is placed covering the sample frame, side by side 
-		  across rows.
+		  across rows.</li>
 		    <li><em>Systematic non contiguous</em>: the same as above, 
 		  but here ever rectangle is spaced from another by
-		  a specified number of cells
+		  a specified number of cells.</li>
 		    <li><em>Stratified random</em>: the sample frame is
-		  divided in n strats of rows and m strats of columns 
-		  (n and m are given by user), then the specified 
+		  divided in <i>n</i> strats of rows and <i>m</i> strats of columns 
+		  (<i>n</i> and <i>m</i> are given by user), then the specified 
 		  number of sample areas are placed in a random way, 
-		  one for every m*n areas defined by strats.
+		  one for every <i>m*n</i> areas defined by strats.</li>
 		    <li><em>Centered over sites</em>: the sample areas
 		  are placed into sample frame centering them on points 
-		  in site file. 
+		  in site file.</li>
 		  </ul>
 	      <li>mouse: the user chooses the shape and then draws the 
-	      specified number of sample areas on map.
+	      specified number of sample areas on map.</li>
 	   </ul>
 
 	   <li><em>Moving Window:</em> the user defines a rectangular or 
 	 circular area, it is moved over all the raster increasing only
 	 of a cell for every move(in columns if possible, if not in rows). 
-	 It produces a new raster containing the result of all analysis.
+	 It produces a new raster containing the result of all analysis.</li>
 	   <li><em>Select areas from the overlaid vector map</em>: 
 	 the sample areas are defined by the vector map selected above.
 	 For every cat in vector map, the procedure prompts the 
 	 user if he wants to include it as sample area.
 	 The resulting configuration file can be used only with the 
 	 specified raster map, and the procedure can be used only if
-	 whole map layer is selected as sampling frame.
+	 whole map layer is selected as sampling frame.</li>
 	</ul>
    </ol>
 
   <li><em><b>Remove a file</b></em> the selected file is deleted from the
-available configuration files.
-  <li><em><b>Help</b></em>: open this help text.
-  <li><em><b>Close</b></em> module window.
+   available configuration files.</li>
+  <li><em><b>Help</b></em>: open this help text.</li>
+  <li><em><b>Close</b></em> module window.</li>
 </ol>
 
+<h2>EXAMPLES</h2>
 
+<h3>Moving window analysis on full region</h3>
+
+Example for a 7x7 moving window analysis on full region:
+
+<ul>
+<li> Click on "New"</li>
+ <ul>
+  <li> Configuration file name: "movwindow7"</li>
+  <li> Raster map name to use to select areas: "forests"</li>
+ </ul>
+</ul>
+
+1. Setup sampling frame:
+<ul>
+<li> Define a sampling frame (region for analysis): "Whole map layer", then "OK"</li>
+</ul>
+
+2. Setup sampling frame
+<ul>
+<li> Define sampling areas: "Moving window", then "OK"</li>
+<li> Then click on "Use keyboard to define moving window dimension"</li>
+<ul>
+ <li>Select type of shape</li>
+ <ul>
+  <li> [x] Rectangular</li>
+  <li> Width size (in cells)?: "7"</li>
+  <li> Height size (in cells)?: "7"</li>
+  <li> Then "Save settings"</li>
+ </ul>
+ </ul>
+</ul>
+
+3. Save settings: click on button
+<br>
+(4.) Close
+<p>
+Now an anaysis can be performed using one of the analytical modules, e.g.
+<div class="code"><pre>
+r.li.patchdensity map=forests conf=movwindow7 output=forests_p_dens7
+</pre></div>
+
+The result is a new raster map "forests_p_dens7".
+<br>
+See the respective modules for further examples.
+
+<!-- TODO: add configuration example which results in ASCII output rather than raster map -->
+
 <h2>NOTES</h2>
 
 Configuration files are raster map independent because areas are saved using 
@@ -152,10 +200,14 @@
 
 <h2>SEE ALSO</h2>
 
-<em><a href="http://grass.osgeo.org/gdp/landscape/r_le_manual5.pdf">Old r.le suite manual</a></em><br>
-<em><a href="r.li.html">r.li</a></em> package overview<br>
-<em><a href="r.li.daemon.html">r.li.daemon</a></em>,
-<em><a href="r.li.patchdensity.html">r.li.patchdensity</a></em>
+<em>
+<a href="r.li.html">r.li</a> - package overview<br>
+<a href="r.li.daemon.html">r.li.daemon</a>
+</em>
+<p>
+<em>
+<a href="http://grass.osgeo.org/gdp/landscape/r_le_manual5.pdf">Old r.le suite manual</a>
+</em>
 
 
 <h2>AUTHORS</h2>



More information about the grass-commit mailing list