layer_n: N intersections

View source: R/intersections.R

layer_nR Documentation

N intersections

Description

Find all fragments that are intersected by any other feature in any layer.

Usage

layer_n(x, n = 2, ..., keep_index = FALSE)

Arguments

x

polymer

n

minimum number of intersections to keep

...

ignored for now

keep_index

for expert use only, maintains the list of triangle indexes on the sf output (and sf cannot plot if that is present)

Details

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.

Value

sf data frame

Examples

library(sf)
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")

mdsumner/polymer documentation built on Feb. 5, 2024, 4:55 p.m.