other versions
- jessie 6.4.4-1
- stretch 7.2.0-2
- testing 7.6.0-1
- unstable 7.6.0-1
- experimental 7.6.1-1~exp1
r.patch(1grass) | Grass User's Manual | r.patch(1grass) |
NAME¶
r.patch - 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.KEYWORDS¶
raster, geometrySYNOPSIS¶
r.patchFlags:¶
- -q
-
- -z
-
- --overwrite
-
- --verbose
-
- --quiet
-
Parameters:¶
- input=name[,name,...]
-
- output=name
-
DESCRIPTION¶
The GRASS program r.patch allows the user to build a new raster map the size and resolution of the current region by assigning known data values from input raster maps to the cells in this region. This is done by filling in "no data" cells, those that do not yet contain data, contain NULL data, or, optionally contain 0 data, with the data from the first input map. Once this is done the remaining holes are filled in by the next input map, and so on. 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. The first name listed in the string input=name,name,name, ... is the name of the first map whose data values will be used to fill in "no data" cells in the current region. The second through last input name maps will be used, in order, to supply data values for for the remaining "no data" cells.EXAMPLE¶
Below, the raster map layer on the far left is patched with the middle ( patching) raster map layer, to produce the composite raster map layer on the right.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
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
NOTES¶
Frequently, this program is used to patch together adjacent map layers which have been digitized separately. The program v.mkgrid can be used to make adjacent maps align neatly. The user should check the current geographic region settings before running r.patch, to ensure that the region boundaries encompass all of the data desired to be included in the composite map and to ensure that the region resolution is the resolution of the desired data. To set the geographic region settings to one or several raster maps, the g.region program can be used:EXAMPLE¶
Create a list of maps matching a pattern, extend the region to include them all, and patch them together to create a mosaic. Overlapping maps will be used in the order listed.SEE ALSO¶
g.region, g.remove, g.rename, r.mapcalc, r.support, v.mkgridAUTHOR¶
Michael Shapiro, U.S. Army Construction Engineering Research LaboratoryGRASS 6.4.4 |