Open mdsumner opened 1 year ago
and for bigger stuff
well I don't believe this is right
remove_n <- function(x) {
if (is.recursive(x)) return(lapply(x, remove_n) )
head(x, -1)
}
g <- remove_n(silicate::inlandwaters$geom[[5]][[2]])
g <- list(g[[1]], g[-1])
x <- do.call(cgalPolygonWithHoles$new, g)
x$convexParts()
Error: Found two holes intersecting each other
wip, but removing the offending holes (just keep one of them) gives
at this point the the exploding number of CGAL packages on CRAN, probably just dig into the impl and diy