[GRASS-SVN] r49338 - grass-addons/raster/r.pi/r.pi.import

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Nov 23 11:08:37 EST 2011


Author: wegmann
Date: 2011-11-23 08:08:37 -0800 (Wed, 23 Nov 2011)
New Revision: 49338

Modified:
   grass-addons/raster/r.pi/r.pi.import/description.html
Log:
remove html tags in examples

Modified: grass-addons/raster/r.pi/r.pi.import/description.html
===================================================================
--- grass-addons/raster/r.pi/r.pi.import/description.html	2011-11-23 16:07:36 UTC (rev 49337)
+++ grass-addons/raster/r.pi/r.pi.import/description.html	2011-11-23 16:08:37 UTC (rev 49338)
@@ -12,18 +12,18 @@
 
 In order to run <em>r.pi.import</em> we need an exported patch index raster:
 <div class="code"><pre>
-<b> r.pi.index input=</b>landclass96 <b>output=</b>landclass96_forestclass5_area <b>keyval=</b>5 <b>method=</b>area
+r.pi.index input=landclass96 output=landclass96_forestclass5_area keyval=5 method=area
 </pre></div>
 
 export this resulting map:
 <div class="code"><pre>
-<b>r.pi.export input=</b>landclass96_forestclass5_area <b>output=</b>patch_area_out <b>values=</b>patch_area_values <b>id_raster=</b>forestclass5_ID <b>stats=</b>average,variance,min
+r.pi.export input=landclass96_forestclass5_area output=patch_area_out values=patch_area_values id_raster=forestclass5_ID stats=average,variance,min
 </pre></div>
 
 modify it with R or just import the file again and assign the percentage coverage to each fragment. You need the <em>patch_area_values</em> file and the previously used input file <em>forestclass96</em> raster (important: the same patch coverage is mandatory otherwise patch ID in the text file and raster are not congruent!):
 
 <div class="code"><pre>
-<b>r.pi.import input=</b>patch_area_values <b>raster=</b>landclass96 <b>output=</b>imported_values <b>keyval=</b>5 <b>id_col=</b>1 <b>val_col=</b>2
+r.pi.import input=patch_area_values raster=landclass96 output=imported_values keyval=5 id_col=1 val_col=2
 </pre></div>
 
 if you want to export the patch values to R and do e.g. a linear regression of two patch values and import them again in GRASS, do:<br>
@@ -31,14 +31,14 @@
 apply r.pi.export with two indices (A and B), in R do:
 
 <div class="code"><pre>
-resid.AB <b><- resid(lm(A[,3]~B[,3]))</b> #write residuals of a linear regression
-df.resid.AB <b><- data.frame(A[,1],resid.AB)</b> #merge patch IDs and resid into same data frame
-<b>write.table(</b>df.resid.AB,"resid.for.GRASS"<b>,row.names=F,col.names=F)</b>
+resid.AB <- resid(lm(A[,3]~B[,3])) #write residuals of a linear regression
+df.resid.AB <- data.frame(A[,1],resid.AB) #merge patch IDs and resid into same data frame
+write.table(df.resid.AB,"resid.for.GRASS",row.names=F,col.names=F)
 </pre></div>
 
 exit R and run in GRASS:
 <div class="code"><pre>
-<b>r.pi.import input=</b>resid.for.GRASS <b>raster=</b>landclass96 <b>output=</b>resid.AB <b>keyval=</b>5 <b>id_col=</b>1 <b>val_col=</b>2
+r.pi.import input=resid.for.GRASS raster=landclass96 output=resid.AB keyval=5 id_col=1 val_col=2
 </pre></div>
 
 



More information about the grass-commit mailing list