1

I have a road network as an sf layer in R. I would like to check and correct its topology so that all dangles are removed, undershoots are extended, and all intersections happen at a vertex. Only genuine dead-ends (cul-de-sacs) will be maintained and they have been defined as the road segment that ends at a distance more than 500m from a vertex. By googling around, I am only seeing codes like this:

roads %<>% st_make_valid(geos_method = "valid_structure", geos_keep_collapsed = F)

In this code, I don't have an option to define these rules I want to enforce. Are there other packages that can better serve my purpose? How?

  • 1
    What you describe might be a case for {sfnetworks} package - have a look at the https://luukvdmeer.github.io/sfnetworks/articles/sfn02_preprocess_clean.html - vignette. – Jindra Lacko May 09 '23 at 10:16
  • 1
    You need to provide a [minimal, reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) of your data. – M-- May 14 '23 at 01:53

0 Answers0