luukvdmeer / sfnetworks

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

Check if endpoints of edges match nodes when constructing an sfnetwork #38

Closed luukvdmeer closed 4 years ago

luukvdmeer commented 4 years ago

The construction function of sfnetwork objects now accepts an sf object (with POINT geometry) as nodes, and an sf object (with LINESTRING geometry) as edges. The edges should have a to and from column referring to the indices of their terminate nodes. However, the construction function does not check if the coordinates of the endpoints of each edge match with the coordinates of the terminate nodes of that edge. Such a check should be implemented.

luukvdmeer commented 4 years ago

This check is implemented in the new version