Closed dpriss closed 1 year ago
Hi Deborah and thanks for your question. Could you please create a reproducible example showing the error? Do you get any other error or warning before that last bit of code? I can run the code in the vignette without any problem, so it's quite difficult to diagnose the problem.
Hi Andrea, thanks for getting back to me so quickly. I think I just found out what the problem is:
In the vignette, one of the first steps is to round the geometry but when I do it, I get the error message when trying to use to_spatial_contracted
later. If I don't round the geometry, everything works fine.
Thanks for reporting! After some trying I could reproduce the error. This seemed indeed like a bug (there was no fallback when no edges other than loop edges needed to be updated after contraction). It should be fixed now on Github (and in the minor version update on its way to CRAN asap).
Great, thank you!
Hello, I've followed the steps for network pre-processing and network cleaning from this tutorial https://luukvdmeer.github.io/sfnetworks/articles/sfn02_preprocess_clean.html and everything works fine except the last bit when trying to contract the network, i.e.:
contracted = convert( clustered, to_spatial_contracted, cls, cmp, simplify = TRUE )
Here, I always get the error
I tried it with different input data sets (.shp), including the toy data provided in the tutorial, but the error comes up with all of them.
Here's my
sessionInfo()
in case that's helpful:Any idea why I get this error and how to solve it? Many thanks!
Deborah