gDefrag.full: Wrapper function running the full process

View source: R/gDefrag.full.R

gDefrag.fullR Documentation

Wrapper function running the full process

Description

This function runs the full process of creating the nodes, creating the edges and establishing priority edges to be used to enhance connectivity in the landscape for the focal species.

Usage

gDefrag.full(land_polyg, method, value_col = NULL, 
min_length = 0, min_pol_area = 0, shape = FALSE, 
shape_name_nodes = "shape_all_nodes", shape_name_edges = "shape_edges", 
shape_name_out = "priorities_shape", 
shape_name_nodes_edges = "nodes_with_edges", 
scale_nodes = 10, col_nodes = "deepskyblue4", col_labels = "white", 
cex_labels = 1, main = "Graph")

Arguments

land_polyg

SpatialPolygonsDataFrame loaded with readOGR function of the package rgdal (polygon shapefile). To be internally passed to as node.creation and as edge.creation.

method

Method to be used in the prioritization of the connectivity corridors. Detailed description in the 'details' section. To be internally passed to as prioritize.

value_col

Identification of the column in the 'land_polyg' object. To be internally passed to as prioritize.

min_length

Minimum length of the road segment to consider creating an edge representing it. To be internally passed to as edge.creation.

min_pol_area

Minimum area of the polygon to consider creating a node representing it. To be internally passed to as node.creation.

shape

Produce node and edges shapefiles as output? (TRUE/FALSE) To be internally passed to as node.creation and as edge.creation.

shape_name_nodes

Name of the nodes shapefile to be created (all nodes).

shape_name_edges

Name of the edges shapefile to be created (without prioritization).

shape_name_out

Name of the edges prioritization output shapefile to be created.

scale_nodes

Node size scaling factor for correct viewing in the plot. To be internally passed to as plotgraph.

col_nodes

Node colour. To be internally passed to as plotgraph.

col_labels

Labels colour. To be internally passed to as plotgraph.

cex_labels

Text labels font size. To be internally passed to as plotgraph.

main

Main plot title. To be internally passed to as plotgraph.

overwrite

Should the shapefile file be overwritten?

Details

If shape = TRUE, this function produces four shapefiles: all nodes, nodes with area greater than 'min_pol_area', edges without prioritization metrics, edges with prioritization metrics. The prioritization of the connectivity corridors can be made with one of four methods (argument 'method'):

  • 'value' - Give priority to edges connecting nodes with higher attribute value (e.g. suitability for the focal species);

  • 'traffic' - Give priority to edges representing roads with more traffic;

  • 'IIC' - Give priority to edges with higher overall impact in the connectivity. This was implemented by using the Integral Index of Connectivity (IIC) developed by Pascual-Hortal and Saura (2006). The connectivity relevance of each edge was evaluated usinf the approach described in Pascual-Hortal and Saura (2006): dIIC=((I1-I2)/I1)*100, where I1 is the IIC before edge removal and I2 is the IIC after.

  • 'between' - Give priority to edges with higher betweenness using the function edge.beetweenness.estimate from the igraph package.

  • 'AWM' - Give priority to edges connecting nodes with more suitable area.

Value

This function produces a SpatVector with the priorization results.

Author(s)

Frederico Mestre, Fernando Ascensao and A. Marcia Barbosa

See Also

node.creation, edge.creation, plotgraph, prioritize

Examples


data(road_P)

out1 <- gDefrag.full(land_polyg = road_P, method = "value", 
                     value_col = "frst_sm", main = "value-based graph", 
                     shape_name_nodes = "fullrun_shape_all_nodes0", 
                     shape_name_edges = "fullrun_shape_edges0", 
                     shape_name_out = "fullrun_priorities_shape0",
                     shape = TRUE,
                     overwrite = TRUE)


FMestre1/gDefrag documentation built on June 11, 2025, 1:32 a.m.