~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to raster/r.patch/description.html

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<h2>DESCRIPTION</h2>
2
 
 
3
 
The GRASS program <em>r.patch</em> allows the user to build a new
4
 
raster map the size and resolution of the current region by assigning
5
 
known data values from input raster maps to the cells in this region.
6
 
This is done by filling in "no data" cells, those that do not yet
7
 
contain data, contain NULL data, or, optionally contain 0 data,
8
 
with the data from the first input map.
9
 
Once this is done the remaining holes are filled in by the next input map,
10
 
and so on.
11
 
This program
12
 
is useful for making a composite raster map layer from two or more adjacent
13
 
map layers, for filling in "holes" in a raster map layer's data (e.g., in
14
 
digital elevation data), or for updating an older map layer with more recent
15
 
data. The current geographic region definition and mask settings are
16
 
respected.
17
 
<p>
18
 
The first <em>name</em> listed in the string
19
 
<b>input=</b><em>name</em>,<em>name</em>,<em>name</em>, ... is the name of
20
 
the first map whose data values will be used to fill in "no data" cells
21
 
in the current region. The second through last input <em>name</em>
22
 
maps will be used, in order, to supply data values for for the remaining
23
 
"no data" cells.
24
 
 
25
 
<h2>EXAMPLE</h2>
26
 
 
27
 
Below, the raster map layer on the far left is <b>patched</b> 
28
 
with the middle (<em>patching</em>) raster map layer, 
29
 
to produce the <em>composite</em> raster map layer on the right. 
30
 
 
31
 
<pre>
32
 
  1 1 1 0 2 2 0 0    0 0 1 1 0 0 0 0    1 1 1 1 2 2 0 0
33
 
  1 1 0 2 2 2 0 0    0 0 1 1 0 0 0 0    1 1 1 2 2 2 0 0
34
 
  3 3 3 3 2 2 0 0    0 0 0 0 0 0 0 0    3 3 3 3 2 2 0 0
35
 
  3 3 3 3 0 0 0 0    4 4 4 4 4 4 4 4    3 3 3 3 4 4 4 4
36
 
  3 3 3 0 0 0 0 0    4 4 4 4 4 4 4 4    3 3 3 4 4 4 4 4
37
 
  0 0 0 0 0 0 0 0    4 4 4 4 4 4 4 4    4 4 4 4 4 4 4 4
38
 
</pre>
39
 
 
40
 
Switching the <em>patched</em> and the <em>patching</em> raster map layers 
41
 
produces the following results: 
42
 
 
43
 
<pre>
44
 
  0 0 1 1 0 0 0 0    1 1 1 0 2 2 0 0    1 1 1 1 2 2 0 0
45
 
  0 0 1 1 0 0 0 0    1 1 0 2 2 2 0 0    1 1 1 1 2 2 0 0
46
 
  0 0 0 0 0 0 0 0    3 3 3 3 2 2 0 0    3 3 3 3 2 2 0 0
47
 
  4 4 4 4 4 4 4 4    3 3 3 3 0 0 0 0    4 4 4 4 4 4 4 4
48
 
  4 4 4 4 4 4 4 4    3 3 3 0 0 0 0 0    4 4 4 4 4 4 4 4
49
 
  4 4 4 4 4 4 4 4    0 0 0 0 0 0 0 0    4 4 4 4 4 4 4 4
50
 
</pre>
51
 
 
52
 
<h2>NOTES</h2>
53
 
 
54
 
Frequently, this program is used to patch together adjacent map layers which
55
 
have been digitized separately.  The program 
56
 
<em><a href="v.mkgrid.html">v.mkgrid</a></em> can be used to make adjacent
57
 
maps align neatly.
58
 
 
59
 
<p>
60
 
The user should check the current geographic region settings before running 
61
 
<em>r.patch</em>, to ensure that the region boundaries encompass all 
62
 
of the data desired to be included in the composite map and to ensure that the
63
 
region resolution is the resolution of the desired data. To set the
64
 
geographic region settings to one or several raster maps, the <em>g.region</em>
65
 
program can be used:
66
 
 
67
 
<div class="code"><pre>
68
 
g.region rast=map1[,map2[,...]]
69
 
</pre></div>
70
 
 
71
 
<p>
72
 
 
73
 
Use of <em>r.patch</em> is generally followed by use of the GRASS programs 
74
 
<em><a href="g.remove.html">g.remove</a></em> and 
75
 
<em><a href="g.rename.html">g.rename</a></em>;
76
 
<em>g.remove</em> is used to remove the original (un-patched) raster map
77
 
layers, while <em>g.rename</em> is used to then assign to the newly-created
78
 
composite (patched) raster map layer the name of the original raster map
79
 
layer.
80
 
 
81
 
<p>
82
 
<em>r.patch</em> creates support files for the patched, composite output map. 
83
 
 
84
 
 
85
 
<h2>EXAMPLE</h2>
86
 
 
87
 
Create a list of maps matching a pattern, extend the region to include them
88
 
all, and patch them together to create a mosaic. Overlapping maps will be 
89
 
used in the order listed.
90
 
 
91
 
<div class="code"><pre>
92
 
MAPS=`g.mlist type=rast sep=, pat="map_*"`
93
 
g.region rast=$MAPS
94
 
r.patch in=$MAPS out=mosaic
95
 
</pre></div>
96
 
<br>
97
 
 
98
 
 
99
 
<h2>SEE ALSO</h2>
100
 
 
101
 
<em><a href="g.region.html">g.region</a></em>,
102
 
<em><a href="g.remove.html">g.remove</a></em>,
103
 
<em><a href="g.rename.html">g.rename</a></em>,
104
 
<em><a href="r.mapcalc.html">r.mapcalc</a></em>,
105
 
<em><a href="r.support.html">r.support</a></em>,
106
 
<em><a href="v.mkgrid.html">v.mkgrid</a></em>
107
 
 
108
 
<h2>AUTHOR</h2>
109
 
 
110
 
Michael Shapiro, 
111
 
U.S. Army Construction Engineering Research Laboratory
112
 
<br>
113
 
-z flag by Huidae Cho
114
 
 
115
 
<p><i>Last changed: $Date: 2011-11-08 12:29:50 +0100 (Tue, 08 Nov 2011) $</i>