View source: R/graphab_project.R
graphab_project | R Documentation |
The function creates a Graphab project from a raster file on which habitat patches can be delimited.
graphab_project( proj_name, raster, habitat, nomerge = FALSE, minarea = 0, nodata = NULL, maxsize = NULL, con8 = FALSE, alloc_ram = NULL, proj_path = NULL )
proj_name |
A character string indicating the Graphab project name. The project name is also the name of the project directory in which the file proj_name.xml will be created. |
raster |
A character string indicating the name of the .tif raster file or of its path. If the path is not specified, the raster must be present in the current working directory. Raster cell values must be in INT2S encoding. |
habitat |
An integer or numeric value or vector indicating the code.s (cell value.s) of the habitat cells in the raster file. |
nomerge |
(optional, default=FALSE) A logical indicating whether
contiguous patches corresponding to different pixel codes are merged
(FALSE, default) or not merged (TRUE).
Be careful, the |
minarea |
(optional, default=0) An integer or numeric value specifiying the minimum area in hectares for a habitat patch size to become a graph node. |
nodata |
(optional, default=NULL) An integer or numeric value specifying the code in the raster file associated with nodata value (often corresponding to peripheric cells) |
maxsize |
(optional, default=NULL) An integer or numeric value
specifying the maximum side length of the rectangular full extent of each
habitat patch in metric units. If this side length exceeds |
con8 |
(optional, default=FALSE) A logical indicating whether a
neighborhood of 8 pixels (TRUE) is used for patch definition. By default,
|
alloc_ram |
(optional, default = NULL) Integer or numeric value indicating RAM gigabytes allocated to the java process. Increasing this value can speed up the computations. Too large values may not be compatible with your machine settings. |
proj_path |
(optional) A character string indicating the path to the
directory that contains the project directory. It should be used when the
project directory is not in the current working directory. Default is NULL.
When 'proj_path = NULL', the project directory is equal to |
A habitat patch consists of the central pixel with its eight neighbors if they are of the same value (8-connexity) and the path geometry is not simplified. See more information in Graphab 2.8 manual: https://sourcesup.renater.fr/www/graphab/download/manual-2.8-en.pdf
P. Savary, T. Rudolph
## Not run: proj_name <- "grphb_ex" raster <- "rast_ex.tif" habitat <- 5 graphab_project(proj_name = proj_name, raster = raster, habitat = habitat) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.