1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
|
<h2>DESCRIPTION</h2>
<em>v.reclass</em> allows user to create a new vector map based on
the reclassification of an existing vector map. It also allows the user
to change the <i>key column</i> away from the default of "<b>cat</b>" with
the <b>column</b> option.
<p>Rules file may contain on each row either pair:
<div class="code"><pre>
keyword value
</pre></div>
(separated by space) or comment beginning with '#' (hash).
Definition of new category begins with keyword <em>cat</em> followed
by the new category value.
Keyword <em>where</em> specifies SQL where condition.
<h2>NOTES</h2>
No table is created for the reclassed map if the <b>column</b> option is
used and the column type is integer (as the result could contain ambiguities).
If the <b>column</b> option is used and the column type is string, a new
table is created containing the newly generated cat numbers and a single
column containing the unique string column values, sorted in alphabetical
order.
<p>For dissolving common boundaries, see
<em><a href="v.dissolve.html">v.dissolve</a></em>.
<p>Either the <b>rules</b> or <b>column</b> option must be specified.
<h2>EXAMPLES</h2>
<h3>Example 1: Reclass by rules</h3>
<div class="code"><pre>
v.reclass input=land output=land_u type=boundary rules=land.rcl
</pre></div>
The rules file contains:
<div class="code"><pre>
# land reclass file
cat 1
where use = 'E13' and owner = 'Jara Cimrman'
cat 2
where use = 'E14'
</pre></div>
Produces a new vector area map <em>land_u</em> containing boundaries from
<em>land</em> with area category values selected from database by SQL
select statement:
<br>
<code>select id from tland where use = 'E13' and owner = 'Jara Cimrman'</code>
changed to category 1;
<br>
values selected from database by SQL select statement:
<br>
<code>select id from tland where use = 'E14'</code> changed to category 2.
<h3>Example 2: Reclass by attribute column</h3>
(North Carolina sample dataset)<br>
<div class="code"><pre>
v.reclass in=streams out=streams_by_type column=I_vs_P
v.db.select streams_by_type
cat|I_vs_P
1|intermittent
2|perennial
</pre></div>
<h2>KNOWN ISSUES</h2>
No table is created for reclassed layer if the <b>rules</b> option is used.
<h2>SEE ALSO</h2>
<em>
<a href="v.dissolve.html">v.dissolve</a>,
<a href="v.extract.html">v.extract</a>
</em>
<p><em><a href="sql.html">GRASS SQL interface</a></em>
<h2>AUTHORS</h2>
R.L. Glenn, USDA, SCS, NHQ-CGIS<br>
from v.reclass to v.db.reclass and later to v.reclass in 5.7 rewritten
by Radim Blazek
|