.TH r.patch .SH NAME \fIr.patch\fR \- Creates a composite raster map layer by using known category values from one (or more) map layer(s) to fill in areas of "no data" in another map layer. .br .I (GRASS Raster Program) .SH SYNOPSIS .B r.patch .br \fBr.patch help\fR .br \fBr.patch \fR[\fB-q\fR] \fBinput\*=\fIname\fR[,\fIname\fR,...] \fBoutput\*=\fIname\fR .SH DESCRIPTION The GRASS program .I r.patch allows the user to assign known data values from other raster map layers to the \fI"no data"\fR areas (those assigned category value 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. .LP The program will be run non-interactively if the user specifies program arguments on the command line, using the form .LP .RS \fBr.patch \fR[\fB-q\fR] \fBinput\*=\fIname\fR[,\fIname\fR,...] \fBoutput\*=\fIname\fR .RE .LP where each input \fIname\fR is the name of a raster map layer to be patched, the output \fIname\fR is the name assigned to the new composite raster map layer containing the patched result, and the (optional) \fI-q\fR flag directs \fIr.patch\fR to run quietly. .LP The first \fIname\fR listed in the string input\*=\fIname,name,name, ...\fR 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 \fIname\fR maps listed. The second through tenth input \fIname\fR maps will be used to supply remaining missing (zero) data values for the first input map \fIname\fR, based on the order in which they are listed in the string input\*=\fIname,name,name, ...\fR. .LP Alternately, the user can simply type \fBr.patch\fR on the command line, without program arguments. In this case, the user will be prompted for the flag setting and parameter values using the standard GRASS parser interface described in the manual entry for \fIparser\fR. .LP \fBFlag:\fR .IP \fB-q\fR 18 Directs that \fIr.patch\fR run quietly, suppressing output of messages on program progress to standard output. .LP \fBParameters:\fR .IP \fBinput\*=\fIname,name,...\fR 18 The name(s) of between one and ten existing raster map layers to be patched together. The first of the ten maps listed will be used as a base map, and the second through tenth maps listed will be used to supply missing (zero) category values for the first map. .IP \fBoutput\*=\fIname\fR 18 The name of the new raster map to contain the resultant patched output. .SH EXAMPLE Below, the raster map layer on the far left is \fBpatched\fR with the middle (\fIpatching\fR) raster map layer, to produce the \fIcomposite\fR raster map layer on the right. .LP .in +.5i .nf 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 .fi .in -.5i Switching the \fIpatched\fR and the \fIpatching\fR raster map layers produces the following results: .LP .in +.5i .nf 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 .fi .in -.5i .SH NOTES Frequently, this program is used to patch together adjacent map layers which have been digitized separately. The programs \fIv.mkquads\fR and \fIv.mkgrid\fR can be used to make adjacent maps align neatly. The user should check the current geographic region settings before running \fIr.patch\fR, to ensure that the region boundaries encompass all of the data desired to be included in the composite map. Use of \fIr.patch\fR is generally followed by use of the GRASS programs \fIg.remove\fR and \fIg.rename\fR; \fIg.remove\fR is used to remove the original (un-patched) raster map layers, while \fIg.rename\fR is used to then assign to the newly-created composite (patched) raster map layer the name of the original raster map layer. \fIr.patch\fR creates support files for the patched, composite output map. .SH "SEE ALSO" .I g.region, .I g.remove, .I g.rename, .I r.mapcalc, .I r.support, .I v.mkgrid, .I v.mkquads, and .I parser .SH "AUTHOR" Michael Shapiro, U.S. Army Construction Engineering Research Laboratory