Skip to content

Question: How do I access edge attributes? #160

@Remmargyp

Description

@Remmargyp

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!

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions