guysvilla.blogg.se

Copy raster in r
Copy raster in r




copy raster in r copy raster in r

The user should therefore be aware that grid cells in the MASK map containing NULL or 0 will replace data with NULL, while cells containing other values will allow data to pass through unaltered. Such layers could have other values than 1 and NULL. But note that a MASK can also be created using other functions that have a raster as output, by naming the output raster ’MASK’. The r.mask function creates a MASK with values 1 and NULL. Note that the maskcats can only be used if the input map is an integer map.

copy raster in r

The user can select category values from the input raster to use in the MASK with the maskcats parameter if r.mask is run from the command line, the category values listed in maskcats must be quoted (see example below). A reclass map takes up less space, but is affected by any changes to the underlying map from which it was created. R.mask uses r.reclass to create a reclassification of an existing raster map and name it MASK. Areas inside the MASK are not hidden areas outside the MASK will be ignored until the MASK file is removed. The above method for specifying a "mask" may seem counterintuitive. Alternatively, a mask can be removed using g.remove or by renaming it to any other name with g.rename. To remove a mask and restore raster operations to normal (i.e., all cells of the current region), remove the MASK by setting the -r remove MASK flag (r.mask -r). The user should be aware that a MASK remains in place until a user renames it to something other than "MASK", or removes it. To only convert specific values (or range of values) to 1 and the rest to NULL, use the maskcats parameter.īecause the MASK created with r.mask is actually only a reclass map named "MASK", it can be copied, renamed, removed, and used in analyses, just like other GRASS raster map layers. All these areas will be part of the MASK (see the notes for more details). Data falling within the boundaries of the MASK can be modified and operated upon by other GRASS raster modules data falling outside the MASK is treated as if it were NULL.īy default, r.mask converts any non-NULL value in the input map, including zero, to 1. The MASK will block out certain areas of a raster map from analysis and/or display, by "hiding" them from sight of other GRASS modules. The MASK is applied when reading an existing GRASS raster map, for example when used as an input map in a module. R.mask - Facilitates creation of a raster "MASK" map to control raster operations. WHERE conditions of SQL statement without ’where’ keyword (vector) When used with direct OGR access this is the layer name. This number determines which layer to use. Vector features can have category values in different layers. Or data source for direct OGR access layer= string Name of raster map to use as mask maskcats= string Remove existing mask (overrides other options) -overwriteĪllow output files to overwrite existing files -helpįorce launching GUI dialog Parameters raster= name Raster, mask, null data, no-data Synopsis Creates a MASK for limiting raster operation.






Copy raster in r