Jelajahi Sumber

r.to.vect manual: examples added

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@58592 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler 11 tahun lalu
induk
melakukan
e78ce9c7da
1 mengubah file dengan 65 tambahan dan 13 penghapusan
  1. 65 13
      raster/r.to.vect/r.to.vect.html

+ 65 - 13
raster/r.to.vect/r.to.vect.html

@@ -4,12 +4,12 @@
 layer, extracts points, lines or area edge features from it, converts data
 layer, extracts points, lines or area edge features from it, converts data
 to GRASS vector format.
 to GRASS vector format.
 
 
-<h3>Points</h3>
+<h3>Point conversion</h3>
 
 
-The <em>r.to.vect</em> program extracts data from a GRASS raster map layer and stores output 
-in a new GRASS <em>vector</em> file.  
+The <em>r.to.vect</em> program extracts data from a GRASS raster map 
+layer and stores output in a new GRASS <em>vector</em> file.  
 
 
-<h3>Lines</h3>
+<h3>Line conversion</h3>
 <em>r.to.vect</em> assumes that the <em>input</em> map has been thinned
 <em>r.to.vect</em> assumes that the <em>input</em> map has been thinned
 using <em><a href="r.thin.html">r.thin</a></em>.
 using <em><a href="r.thin.html">r.thin</a></em>.
 
 
@@ -28,7 +28,7 @@ These excessive nodes and spurs may be removed using
 <em><a href="v.clean.html">v.clean</a></em>.
 <em><a href="v.clean.html">v.clean</a></em>.
 
 
 
 
-<h3>Areas</h3>
+<h3>Area conversion</h3>
 
 
 <em>r.to.vect</em> first traces the perimeter of each unique
 <em>r.to.vect</em> first traces the perimeter of each unique
 area in the raster map layer and creates vector data to
 area in the raster map layer and creates vector data to
@@ -39,7 +39,7 @@ resultant vector area edge data.
 <p>
 <p>
 A true vector tracing of the area edges might appear
 A true vector tracing of the area edges might appear
 blocky, since the vectors outline the edges of raster data
 blocky, since the vectors outline the edges of raster data
-that are stored in rectangular cells.  To produce a
+that are stored in rectangular cells. To produce a
 better-looking vector map, <em>r.to.vect</em> smoothes the
 better-looking vector map, <em>r.to.vect</em> smoothes the
 corners of the vector data as they are being extracted. At
 corners of the vector data as they are being extracted. At
 each change in direction (i.e., each corner), the two
 each change in direction (i.e., each corner), the two
@@ -54,9 +54,53 @@ region (and the original data) to estimate the possible
 error introduced by smoothing.
 error introduced by smoothing.
 
 
 <p>
 <p>
-<em>r.to.vect</em> extracts only area edges from the named raster input file. 
-If the raster map contains other data (i.e., line edges, or point data) the
-output may be wrong. 
+<em>r.to.vect</em> extracts only area edges from the named raster 
+input file. If the raster map contains other data (i.e., line edges, 
+or point data) the output may be wrong.
+
+<h2>EXAMPLES</h2>
+
+The examples are based on the North Carolina sample dataset:
+<p>
+<b>Conversion of raster points to vector points:</b>
+<p>
+Random sampling of points:
+<div class="code"><pre>
+g.region rast=elevation -p
+# random sampling of points (note that r.random also writes vector points)
+r.random elevation raster_output=elevrand1000 n=1000
+r.to.vect input=elevrand1000 output=elevrand1000 type=point
+# univariate statistics of sample points
+v.univar elevrand1000 column=value type=point
+# compare to univariate statistics on original full raster map
+r.univar elevation
+</pre></div>
+<p>
+
+<b>Conversion of raster lines to vector lines:</b>
+<p>
+Vectorization of streams in watershed basins map:
+<div class="code"><pre>
+g.region rast=elevation -p
+r.watershed elev=elevation stream=elev.streams thresh=50000
+r.to.vect -s input=elev.streams output=elev_streams type=line
+# drop "label" column which is superfluous in this example
+v.db.dropcolumn map=elev_streams column=label
+v.db.renamecolumn map=elev_streams column=value,basin_id
+# report length per basin ID
+v.report map=elev_streams option=length units=meters sort=asc
+</pre></div>
+<p>
+
+<b>Conversion of raster polygons to vector polygons:</b>
+<p>
+Vectorization of simplified landuse class map:
+<div class="code"><pre>
+g.region rast=landclass96 -p
+# we smooth corners of area features
+r.to.vect -s input=landclass96 output=my_landclass96 type=area
+v.colors my_landclass96 color=random
+</pre></div>
 
 
 <h2>BUGS</h2>
 <h2>BUGS</h2>
 
 
@@ -64,19 +108,27 @@ For type=line the input raster map MUST be thinned by
 <em><a href="r.thin.html">r.thin</a></em>;
 <em><a href="r.thin.html">r.thin</a></em>;
 if not, <em>r.to.vect</em> may crash.
 if not, <em>r.to.vect</em> may crash.
 
 
-<h2>AUTHOR</h2>
-<b>Points</b><br>
+<h2>SEE ALSO</h2>
+
+<em>
+<a href="g.region.html">g.region</a>,
+<a href="r.thin.html">r.thin</a>,
+<a href="v.clean.html">v.clean</a>
+</em>
+
+<h2>AUTHORS</h2>
+<b>Point support</b><br>
 Bill Brown<br>
 Bill Brown<br>
 <br>
 <br>
 
 
-<b>Lines</b><br>
+<b>Line support</b><br>
 Mike Baba<br>
 Mike Baba<br>
 DBA Systems, Inc.<br>
 DBA Systems, Inc.<br>
 10560 Arrowhead Drive<br>
 10560 Arrowhead Drive<br>
 Fairfax, Virginia 22030<br>
 Fairfax, Virginia 22030<br>
 <br>
 <br>
 
 
-<b>Areas</b><br>
+<b>Area support</b><br>
 <em>Original</em> version of <em>r.poly</em>: 
 <em>Original</em> version of <em>r.poly</em>: 
 <br>
 <br>
 Jean Ezell and Andrew Heekin, 
 Jean Ezell and Andrew Heekin,