luukvdmeer / sfnetworks

Tidy Geospatial Networks in R
https://luukvdmeer.github.io/sfnetworks/
Other
347 stars 20 forks source link

Retrieving or editing attributes of sf objects inside sfnetwork objects #24

Closed luukvdmeer closed 4 years ago

luukvdmeer commented 4 years ago

Is your feature request related to a problem? Please describe. Inside the network structure, nodes and edges are not sf objects anymore. This means that it is not straightforward to access sf object attributes like $sf_column and $agr without first escaping the network structure and then recreating the network. Therefore, it is not supported yet to provide a string to st_set_geometry and to change the attribute-geometry-relationships of columns (without escaping the network structure).

Describe the solution you'd like It would be nice to access the attributes without escaping the network structure. I think tidygraph has a solution for this already (see here), but I have to look into that.

luukvdmeer commented 4 years ago

Note to self: node and edge attributes are stored, and can be retrieved using igraph's vertex_attr and edge_attr.

luukvdmeer commented 4 years ago

This is implemented in the new version.