luukvdmeer / sfnetworks

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

Nodes are not updated after cropping edges #109

Closed luukvdmeer closed 3 years ago

luukvdmeer commented 3 years ago

Describe the bug When running sf::st_crop() on the edges table of a sfnetwork, the edge linestrings are cut by the bounding box of the cropping object. This means that the coordinates of the corresponding end nodes need to be updated too. Currently this is not happening. Hence, cropping edges returns a network without a valid spatial network structure.

Expected behavior Correctly update node coordinates after cropping edges.