grid2edgelist: Get the Edgelist from Coordinates

View source: R/grid2edgelist.R

grid2edgelistR Documentation

Get the Edgelist from Coordinates

Description

This function is used to get the edgelist of a network from coordinates of cells.
A network is built according to the coordinates of cells.
Edges will be generated between the nodes whose distance is smaller than or equal to the given length.
This function is used in the function build_network

Usage

grid2edgelist(grid, edge)

Arguments

grid

the coordinates of cells. It includes at least three columns, x_center, y_center, and id.
x_center is the x coordinates of the cells, and y_center is the y_coordinates of the cells.
id is the indices of thec cells.

edge

the maximal length of an edge in the network.

Details

The output is an edgelist of this network.

Value

an edgelist of a network generated from coordinates of cells using the given maximal edge length.


XTH1114/NBFvis documentation built on Sept. 14, 2022, 1:13 p.m.