Hi! I'm using sfnetworks for a routing algorithm where the inputs are a street-network (shp that is translated to a graph) and a sequence of coordinate-pairs. The algorithm calculates the route between each coordinate pair and creates a dataframe (output) that saves the ids of all edges used by the shortest path. However, I would like to store in the output-dataframe custom ids (called 'LINK_ID', which can be found in the edges of the shapefile).
If I call the graph (with active edges) by typing its name in the console, I can see that the LINK_ID is stored for each edge, but I don't know how to access it. I know that this is a simple issue but I'm stuck.
Hi! I'm using sfnetworks for a routing algorithm where the inputs are a street-network (shp that is translated to a graph) and a sequence of coordinate-pairs. The algorithm calculates the route between each coordinate pair and creates a dataframe (output) that saves the ids of all edges used by the shortest path. However, I would like to store in the output-dataframe custom ids (called 'LINK_ID', which can be found in the edges of the shapefile).
If I call the graph (with active edges) by typing its name in the console, I can see that the LINK_ID is stored for each edge, but I don't know how to access it. I know that this is a simple issue but I'm stuck.
Thanks for all input!