Find all fragments that are intersected by any other feature in any layer.
layer_n(x, n = 2, ..., keep_index = FALSE)
polymer
minimum number of intersections to keep
ignored for now
for expert use only, maintains the list of triangle indexes on the sf output (and sf cannot plot if that is present)
sf data frame
Returns a simple features data frame with all triangles that occur n
times with
n = 2
as a minimum. Each triangle feature contains a nested data frame in idx
that keeps the links to the input layers by layer
, object
and path
.
library(sf)
#> Linking to GEOS 3.10.2, GDAL 3.4.1, PROJ 8.2.1; sf_use_s2() is TRUE
plot(A["layer"], reset = TRUE)
plot(B, add = TRUE, col = "hotpink")
plot(C, add = TRUE, col = "firebrick")
sb <- polymer(A, B, C)
plot(layer_n(sb), add = TRUE, col = "grey")
plot(layer_n(sb, n = 3), add = TRUE, col = "dodgerblue")