Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/edge.creation.R
Generates the graph edges, connecting nodes that are the landscape polygons resulting from the landscape clip by the road network.
1 2 3 | edge.creation(nodes, land_polyg, min_length = 0,
min_pol_area = 0, plot = TRUE, shape = FALSE,
shape_name_edges = "shape_edges")
|
nodes |
Output of the function |
land_polyg |
SpatialPolygonsDataFrame loaded with readOGR function of the package |
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). |
If shape = TRUE, this function produces one shapefile with edges without prioritization metrics.
The function returns a SpatialLinesDataFrame with the edges. The data table of this data frame has the following fields:
node_A - Node A Id.
node_B - Node B Id.
distance - Euclidean distance between nodes A and B (edge length).
x_node_A - Node A longitude.
y_node_A - Node A latitude.
x_node_B - Node B longitude.
y_node_A - Node A latitude.
raster_value_A - Average value of the underlying raster in the polygon represented by node A.
raster_value_B - Average value of the underlying raster in the polygon represented by node B.
road_ID - Id of the road represented by the edge.
road_length - Length of the road represented by the edge.
Frederico Mestre, Fernando Ascensao and A. Marcia Barbosa
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.