luukvdmeer / sfnetworks

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

A new rounding_coords() function #213

Open agila5 opened 2 years ago

agila5 commented 2 years ago

Is your feature request related to a problem? Please describe. The rounding of coordinates may create obscure and difficult-to-detect problems, as described in https://github.com/luukvdmeer/sfnetworks/discussions/211#discussioncomment-3003516

Describe the solution you'd like I think we could create a new function to automatise the "rounding coordinates" operation described in https://luukvdmeer.github.io/sfnetworks/articles/sfn02_preprocess_clean.html#rounding-coordinates. The new function could also have a safety check emitting a warning in case the rounding generates duplicated points (up to a tolerance threshold). We could define a method for sfc/sf/sfnetwork objects.

Describe alternatives you've considered Not sure.