powered by
Generate an igraph object from a SpatialLinesDataFrame.
build_graph(lines, digits, line_weight, 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 Boolean indicating if the original lines attributes must be added to the graph lines
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