edge.creation: Creating graph edges

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/edge.creation.R

Description

Generates the graph edges, connecting nodes that are the landscape polygons resulting from the landscape clip by the road network.

Usage

1
2
3
edge.creation(nodes, land_polyg, min_length = 0, 
min_pol_area = 0, plot = TRUE, shape = FALSE, 
shape_name_edges = "shape_edges")

Arguments

nodes

Output of the function node.creation.

land_polyg

SpatialPolygonsDataFrame loaded with readOGR function of the package rgdal (polygon shapefile).

min_length

Minimum length of the road segment to consider creating an edge representing it.

min_pol_area

Minimum area for a given polygon to be considered a node.

plot

Plot after running? (TRUE/FALSE).

shape

Create a shapefile with the edges (TRUE/FALSE).

shape_name_edges

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

Details

If shape = TRUE, this function produces one shapefile with edges without prioritization metrics.

Value

The function returns a SpatialLinesDataFrame with the edges. The data table of this data frame has the following fields:

Author(s)

Frederico Mestre, Fernando Ascensao and A. Marcia Barbosa

See Also

node.creation

Examples

1
2
3
4
5
6
7
data(road_P)

out1 <- node.creation(land_polyg=road_P, value_col = "forest_sum", scale_nodes = 10, 
col_nodes = "pink", cex_labels = 0.7)

out2 <- edge.creation(nodes = out1, land_polyg = road_P, min_length = 0, 
min_pol_area = 0, plot = FALSE)

gDefrag documentation built on Sept. 3, 2020, 1:07 a.m.