Переглянути джерело

improve examples, add images (backport of https://trac.osgeo.org/grass/changeset/62751, https://trac.osgeo.org/grass/changeset/63389, and https://trac.osgeo.org/grass/changeset/63402)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@63637 15284696-431f-4ddb-bdfa-cd5b030d7da7
Vaclav Petras 10 роки тому
батько
коміт
60784fa52a

+ 8 - 3
imagery/i.cluster/i.cluster.html

@@ -222,19 +222,24 @@ a LANDSAT subscene in North Carolina:
 g.region raster=lsat7_2002_10 -p
 
 # store VIZ, NIR, MIR into group/subgroup
-i.group group=my_lsat7_2002 subgroup=my_lsat7_2002 \
+i.group group=lsat7_2002 subgroup=lsat7_2002 \
   input=lsat7_2002_10,lsat7_2002_20,lsat7_2002_30,lsat7_2002_40,lsat7_2002_50,lsat7_2002_70
 
 i.cluster group=my_lsat7_2002 subgroup=my_lsat7_2002 \
-  signaturefile=sig_clust_lsat2002 \
+  signaturefile=sig_cluster_lsat2002 \
   classes=10 report=rep_clust_lsat2002.txt
 </pre></div>
 
 To complete the unsupervised classification, <em>i.maxlik</em> is subsequently used.
+See example in its manual page.
 
 <h2>SEE ALSO</h2>
 
-The GRASS GIS 4 <em>
+<a href="http://grasswiki.osgeo.org/wiki/Image_processing">Image processing</a>
+and
+<a href="http://grasswiki.osgeo.org/wiki/Image_classification">Image classification</a>
+wiki pages and for historical reference also
+the GRASS GIS 4<em>
 <a href="http://grass.osgeo.org/gdp/imagery/grass4_image_processing.pdf">Image
 Processing manual</a></em>
 

+ 29 - 7
imagery/i.maxlik/i.maxlik.html

@@ -83,19 +83,41 @@ a LANDSAT subscene (VIZ, NIR, MIR channels) in North Carolina
 (see <em><a href="i.cluster.html">i.cluster</a></em> manual page for the first part):
 
 <div class="code"><pre>
-i.maxlik group=my_lsat7_2002 subgroup=my_lsat7_2002 \
-  signaturefile=sig_clust_lsat2002 \
-  class=lsat7_2002_clust_classes reject=lsat7_2002_clust_classes.rej
+i.maxlik group=lsat7_2002 subgroup=lsat7_2002 \
+  signaturefile=sig_cluster_lsat2002 \
+  output=lsat7_2002_cluster_classes reject=lsat7_2002_cluster_reject
 
-# Visually check result
+# visually check result
 d.mon wx0
-d.rast.leg lsat7_2002_clust_classes
-d.rast.leg lsat7_2002_clust_classes.rej
+d.rast.leg lsat7_2002_cluster_classes
+d.rast.leg lsat7_2002_cluster_reject
+
+# see how many pixels were rejected at given levels
+r.report lsat7_2002_cluster_reject units=k,p
+
+# optionally, filter out pixels with high level of rejection
+# here we select 90% which is category 12
+r.mapcalc "lsat7_2002_cluster_classes_filtered = if(lsat7_2002_cluster_reject &lt; 12, lsat7_2002_cluster_classes, null())"
 </pre></div>
 
+<!--
+saved using d.mon wx0; d.rast lsat7_2002_cluster_classes; and save
+then trimmed using mogrify -trim *.png
+-->
+<p>
+<center>
+<img src="i_maxlik_classes.png"><br>
+Resulting raster with classified pixels
+</center>
+
+
 <h2>SEE ALSO</h2>
 
-The GRASS GIS 4 <em>
+<a href="http://grasswiki.osgeo.org/wiki/Image_processing">Image processing</a>
+and
+<a href="http://grasswiki.osgeo.org/wiki/Image_classification">Image classification</a>
+wiki pages and for historical reference also
+the GRASS GIS 4<em>
 <a href="http://grass.osgeo.org/gdp/imagery/grass4_image_processing.pdf">Image
 Processing manual</a></em>
 

BIN
imagery/i.maxlik/i_maxlik_classes.png


+ 29 - 0
raster/r.surf.fractal/r.surf.fractal.html

@@ -15,6 +15,35 @@ for computing Discrete Fourier Transforms.
 
 <h2>EXAMPLE</h2>
 
+Generate surface using fractals in selected region, set color table and
+display with shade.
+
+<div class="code"><pre>
+g.region rast=elevation
+
+r.surf.fractal output=fractals
+
+r.colors map=fractals color=byr
+r.relief input=fractals output=fractals_shade
+
+d.mon wx0
+d.shade relief=fractals_shade drape=fractals b=50
+</pre></div>
+
+<center>
+<img src="r_surf_fractal_simple.png" alt="Artificial surface created with fractals"><br>
+Artificial surface created with fractals<br>
+</center>
+
+<!--
+# leave out d.mon wx0 when generating image
+mogrify -trim map.png
+optipng -o5 map.png
+mv map.png r_surf_fractal_simple.png
+-->
+
+Compare results when using different fractal dimensions:
+
 <div class="code"><pre>
 # D=2.0005
 g.region -dp

BIN
raster/r.surf.fractal/r_surf_fractal_simple.png


+ 16 - 2
vector/v.random/v.random.html

@@ -35,11 +35,25 @@ Generate 20 random points with binary attribute (only 0 or 1):
 v.random output=binary_random npoints=20 zmin=0 zmax=1 column='binary INTEGER'
 </pre></div>
 
-Generate 20 random 3d points with height attribute [0:20] and specific random seed:
+Generate 20 random 3D points using a specific random seed:
 <div class="code"><pre>
-v.random seed=501 output=height_random n=20 zmin=0 zmax=1 column=height
+v.random seed=52 output=height_random npoints=40 zmin=110 zmax=170 -z
 </pre></div>
 
+<p>
+<center>
+<img src="vrandom_z.png"><br>
+Random points with different X, Y, and Z coordinates
+</center>
+
+<!--
+g.region rast=elev_lid792_1m
+...
+d.vect height_random color=60:60:60 icon=basic/point size=40 width=2 zcolor=gyr
+optipng -o5 map.png
+mv map.png vrandom_z.png
+-->
+
 Get 20 random samples from raster map:
 <div class="code"><pre>
 g.region -p raster=elevation

BIN
vector/v.random/vrandom_z.png