graphab_corridor: Computes corridors from least-cost paths already computed in...

View source: R/graphab_corridor.R

graphab_corridorR Documentation

Computes corridors from least-cost paths already computed in the Graphab project

Description

The function computes corridors around the least-cost paths which have been computed in the Graphab project.

Usage

graphab_corridor(
  proj_name,
  graph,
  maxcost,
  format = "raster",
  cost_conv = FALSE,
  proj_path = NULL,
  alloc_ram = 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 is. It can be created with graphab_project

graph

A character string indicating the name of the graph with the links from which the corridors are computed. This graph has been created with Graphab or using graphab_graph function and is associated with a link set. Only the links present in the graph will be used in the computation.

maxcost

An integer or numeric value indicating the maximum cost distance from the least-cost paths considered for creating the corridors, in cost distance units (except when cost_conv = TRUE).

format

(optional, default = "raster") A character string indicating whether the output is a raster file or a shapefile layer.

cost_conv

FALSE (default) or TRUE. Logical indicating whether numeric thr values are converted from cost-distance into Euclidean distance using a log-log linear regression. See also convert_cd function. Only used when mode='neigh'.

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

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.

Details

See more information in Graphab 2.8 manual: https://sourcesup.renater.fr/www/graphab/download/manual-2.8-en.pdf Be careful, when capacity has been changed. The last changes are taken into account for subsequent calculations in a project.

Author(s)

P. Savary

Examples

## Not run: 
graphab_corridor(proj_name = "grphb_ex",
                 graph = "graph",
                 maxcost = 1000,
                 format = "raster",
                 cost_conv = FALSE)

## End(Not run)

graph4lg documentation built on Feb. 16, 2023, 5:43 p.m.