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 91 92 93
|
<H2>DESCRIPTION</H2>
The GRASS program <EM>r.patch</EM> allows the user to assign known data
values from other raster map layers to the <EM>"no data"</EM> areas (those
assigned category value NULL/0) in another raster map layer. This program
is useful for making a composite raster map layer from two or more adjacent
map layers, for filling in "holes" in a raster map layer's data (e.g., in
digital elevation data), or for updating an older map layer with more recent
data. The current geographic region definition and mask settings are
respected.
<P>
The first <EM>name</EM> listed in the string
<B>input=</B><EM>name</EM>,<EM>name</EM>,<EM>name</EM>, ... is the name of
the base map whose zero data values will be attempted to be filled by
non-zero data values in the second through tenth input <EM>name</EM> maps
listed. The second through 200 (max) input <EM>name</EM> maps will be used to
supply remaining missing (zero) data values for the first input map
<EM>name</EM>, based on the order in which they are listed in the string
<B>input=</B><EM>name</EM>,<EM>name</EM>,<EM>name</EM>, ...
<H2>EXAMPLE</H2>
Below, the raster map layer on the far left is <B>patched</B>
with the middle (<EM>patching</EM>) raster map layer,
to produce the <EM>composite</EM> raster map layer on the right.
<PRE>
1 1 1 0 2 2 0 0 0 0 1 1 0 0 0 0 1 1 1 1 2 2 0 0
1 1 0 2 2 2 0 0 0 0 1 1 0 0 0 0 1 1 1 2 2 2 0 0
3 3 3 3 2 2 0 0 0 0 0 0 0 0 0 0 3 3 3 3 2 2 0 0
3 3 3 3 0 0 0 0 4 4 4 4 4 4 4 4 3 3 3 3 4 4 4 4
3 3 3 0 0 0 0 0 4 4 4 4 4 4 4 4 3 3 3 4 4 4 4 4
0 0 0 0 0 0 0 0 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
</PRE>
Switching the <EM>patched</EM> and the <EM>patching</EM> raster map layers
produces the following results:
<PRE>
0 0 1 1 0 0 0 0 1 1 1 0 2 2 0 0 1 1 1 1 2 2 0 0
0 0 1 1 0 0 0 0 1 1 0 2 2 2 0 0 1 1 1 1 2 2 0 0
0 0 0 0 0 0 0 0 3 3 3 3 2 2 0 0 3 3 3 3 2 2 0 0
4 4 4 4 4 4 4 4 3 3 3 3 0 0 0 0 4 4 4 4 4 4 4 4
4 4 4 4 4 4 4 4 3 3 3 0 0 0 0 0 4 4 4 4 4 4 4 4
4 4 4 4 4 4 4 4 0 0 0 0 0 0 0 0 4 4 4 4 4 4 4 4
</PRE>
<H2>NOTES</H2>
Frequently, this program is used to patch together adjacent map layers which
have been digitized separately. The programs
<EM><A HREF="v.mkquads.html">v.mkquads</A></EM> and
<EM><A HREF="v.mkgrid.html">v.mkgrid</A></EM> can be used to make adjacent
maps align neatly.
<P>
The user should check the current geographic region settings before running
<EM>r.patch</EM>, to ensure that the region boundaries encompass all
of the data desired to be included in the composite map.
<P>
Use of <EM>r.patch</EM> is generally followed by use of the GRASS programs
<EM><A HREF="g.remove.html">g.remove</A></EM> and
<EM><A HREF="g.rename.html">g.rename</A></EM>;
<EM>g.remove</EM> is used to remove the original (un-patched) raster map
layers, while <EM>g.rename</EM> is used to then assign to the newly-created
composite (patched) raster map layer the name of the original raster map
layer.
<P>
<EM>r.patch</EM> creates support files for the patched, composite output map.
<H2>SEE ALSO</H2>
<EM><A HREF="g.region.html">g.region</A></EM>,
<EM><A HREF="g.remove.html">g.remove</A></EM>,
<EM><A HREF="g.rename.html">g.rename</A></EM>,
<EM><A HREF="r.mapcalc.html">r.mapcalc</A></EM>,
<EM><A HREF="r.support.html">r.support</A></EM>,
<EM><A HREF="v.mkgrid.html">v.mkgrid</A></EM>,
<EM><A HREF="v.mkquads.html">v.mkquads</A></EM>,
<EM><A HREF="parser.html">parser</A></EM>
<H2>AUTHOR</H2>
Michael Shapiro,
U.S. Army Construction Engineering Research Laboratory
<br>
-z flag by Huidae Cho
<p><i>Last changed: $Date: 2003/05/06 14:44:48 $</i>
|