Learn R Programming

graph4lg (version 2.0.0)

graphab_project: Create a Graphab project

Description

The function creates a Graphab project from a raster file on which habitat patches can be delimited.

Usage

graphab_project(
  proj_name,
  raster,
  nodata = NULL,
  parallel.java = NULL,
  alloc_ram = NULL,
  proj_path = NULL
)

Arguments

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.

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)

parallel.java

An integer indicating how many computer cores are used to run the .jar file. By default, parallel.java = NULL, and java sets it according to local settings.

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 getwd().

Author

P. Savary, T. Rudolph

Details

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 3.0 manual: https://thema.umlp.fr/productions/software/graphab/download/manual-3.0-en.pdf

References

foltete2012softwaregraph4lg foltete2021graphabgraph4lg savary2024multiplegraph4lg

Examples

Run this code
if (FALSE) {
proj_name <- "graphab_example"
raster <- "rast_simul50.tif"
graphab_project(proj_name = proj_name,
               raster = raster)
}

Run the code above in your browser using DataLab