Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 33 additions & 10 deletions scripts/r.reclass.area/r.reclass.area.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,30 @@
<h2>DESCRIPTION</h2>

<em>r.reclass.area</em> reclasses a raster map greater or
less than a user specified area size (in hectares).
<p>
If the <b>-c</b> flag is used, <em>r.reclass.area</em> will skip the
creation of a clumped raster and assume that the input raster is
<em>r.reclass.area</em> removes areas (pixel clumps) from a raster
map that are smaller than a user specified <strong>lower</strong> area
size and/or greater than a user-specified <strong>upper</strong>
threshold (both in hectares).

<em>r.reclass.area</em> provides two <strong>method</strong>s for
filtering:

<ul>
<li><em>reclass</em> - raster-based filtering</li>
<li><em>rmarea</em> - vector-based filtering</li>
</ul>

With the <em>reclass</em> method, the input raster map is clumped and
then reclassified using the clump size. With the <strong>-m</strong>
flag, <em>reclass</em> method will remove small areas already during
clumping, using the <em>minsize</em> option there. If the
<strong>-c</strong> flag is used, <em>r.reclass.area</em> will skip the
creation of a clumped raster and assume that the input raster map is
already clumped.
The <em>rmarea</em> method converts the raster map to vector and
removes areas outside the given thresholds using <a
href="v.clean.md">v.clean</a> and <a href="v.edit.md">v.edit</a>. With
the <strong>-v</strong> flag the <strong>output</strong> is the filtered
vector map instead of a raster.

<h2>EXAMPLES</h2>

Expand All @@ -20,7 +39,7 @@ <h2>EXAMPLES</h2>
Extract only areas greater than 2000 ha, NULL otherwise:

<div class="code"><pre>
r.reclass.area input=zipcodes output=zipcodes_larger2000ha mode=greater value=2000
r.reclass.area input=zipcodes output=zipcodes_larger2000ha greater=2000

r.report zipcodes_larger2000ha unit=h
</pre></div>
Expand All @@ -33,7 +52,7 @@ <h2>EXAMPLES</h2>
In this example, the ZIP code map in the North Carolina sample dataset
is filtered for smaller areas which are substituted with the
value of the respective adjacent area with largest shared
boundary. Reclass by substitutional removing of areas minor of 1000 ha:
boundary. Reclass by substitutional removing of areas smaller than 1000 ha:

<div class="code"><pre>
r.reclass.area input=zipcodes output=zipcodes_minor1000ha mode=lesser value=1000 method=rmarea
Expand All @@ -47,12 +66,16 @@ <h2>EXAMPLES</h2>
<h2>SEE ALSO</h2>

<em>
<a href="r.reclass.html">r.reclass</a>,
<a href="r.clump.html">r.clump</a>,
<a href="r.stats.html">r.stats</a>
<a href="r.reclass.html">r.reclass</a>,
<a href="r.stats.html">r.stats</a>,
<a href="v.to.rast.html">r.stats</a>,
<a href="v.clean.html">r.stats</a>,
<a href="v.edit.html">r.stats</a>
</em>

<h2>AUTHORS</h2>

NRCS,<br>
Markus Neteler
Markus Neteler,<br>
Stefan Blumentath
35 changes: 26 additions & 9 deletions scripts/r.reclass.area/r.reclass.area.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
## DESCRIPTION

*r.reclass.area* reclasses a raster map greater or less than a user
specified area size (in hectares).
*r.reclass.area* removes areas (pixel clumps) from a raster map
that are smaller than a user specified **lower** area size and/or
greater than a user-specified **upper** threshold (both in hectares).

If the **-c** flag is used, *r.reclass.area* will skip the creation of a
clumped raster and assume that the input raster is already clumped.
*r.reclass.area* provides two **method**s for filtering:

- *reclass* - raster-based filtering
- *rmarea* - vector-based filtering

With the *reclass* method, the input raster map is clumped and
then reclassified using the clump size. With the **-m** flag,
*reclass* method will remove small areas already during clumping,
using the *minsize* option there. If the **-c** flag is used,
*r.reclass.area* will skip the creation of a clumped raster and
assume that the input raster map is already clumped.

The *rmarea* method converts the raster map to vector and removes
areas outside the given thresholds using [v.clean](v.clean.md) and
[v.edit](v.edit.md). With the **-v** flag the **output** is the
filtered vector map instead of a raster.

## EXAMPLES

Expand All @@ -19,7 +34,7 @@ r.report zipcodes unit=h
Extract only areas greater than 2000 ha, NULL otherwise:

```sh
r.reclass.area input=zipcodes output=zipcodes_larger2000ha mode=greater value=2000
r.reclass.area input=zipcodes output=zipcodes_larger2000ha greater=2000

r.report zipcodes_larger2000ha unit=h
```
Expand All @@ -30,21 +45,23 @@ r.report zipcodes_larger2000ha unit=h
In this example, the ZIP code map in the North Carolina sample dataset
is filtered for smaller areas which are substituted with the value of
the respective adjacent area with largest shared boundary. Reclass by
substitutional removing of areas minor of 1000 ha:
substitutional removing of areas smaller than 1000 ha:

```sh
r.reclass.area input=zipcodes output=zipcodes_minor1000ha mode=lesser value=1000 method=rmarea
r.reclass.area input=zipcodes output=zipcodes_minor1000ha lesser=1000 method=rmarea
```

![Figure: r.reclass.area method=rmarea](zipcodes_minor1000ha.png)
*Figure: r.reclass.area method=rmarea*

## SEE ALSO

*[r.reclass](r.reclass.md), [r.clump](r.clump.md),
[r.stats](r.stats.md)*
*[r.clump](r.clump.md), [r.reclass](r.reclass.md),
[r.stats](r.stats.md), [v.to.rast](v.to.rast.md),
[v.clean](v.clean.md), [v.edit](v.edit.md)*

## AUTHORS

NRCS,
Markus Neteler
Stefan Blumentath
Loading
Loading