powered by
Generate a directed igraph object from a SpatialLinesDataFrame.
build_graph_directed(lines, digits, line_weight, direction, attrs = FALSE)
A SpatialLinesDataFrame
The number of digits to keep from the coordinates
The name of a field that represent the cost to use a line
A vector of integers. 0 indicates a bidirectional line and 1 an unidirectional line must be added to the graph lines
A boolean indicating if the original lines attributes
A list containing the following elements:
graph: an igraph object that preserves the original lines characteristics
linelist: the dataframe used to build the graph
lines: the original SpatialLinesDataFrame
spvertices: a SpatialPointsDataFrame representing the vertices of the graph
digits : the number of digits kept for the coordinates
# NOT RUN { #This is an internal function, no example provided # }
Run the code above in your browser using DataLab