Skip to content

Self-Loop creation after bNode #1

Description

@carl-mc

For some reason, bNode adds 0-length lines to a grid where there should be none. I remember that we had discussed that issue back in December 2017 and didn't find the error -- I will have another look when I have the time. Quick and dirty solution lies in igraph::simplify. All the best and many thanks for all the help, Carl

library(BoostLines)
library(raster)
r <- raster(ext = extent(c(0,1,0,1)), res = 1/7)
grid.bl <- BoostLines::bGrid(r, n8 = TRUE)

g <- boost2graph(x = node.ls[[1]], df = data.frame(rep(1, length(node.ls[[1]]))),
lonlat = TRUE, plot.result = F)

plot(g, vertex.size = 0.25, vertex.label = NA, layout = as.matrix(cbind(V(g)$x, V(g)$y)))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions