intersect_JamPolygon: Intersect one or more JamPolygon objects

intersect_JamPolygonR Documentation

Intersect one or more JamPolygon objects

Description

Intersect one or more JamPolygon objects

Usage

intersect_JamPolygon(jp, new_name = NULL, ...)

Arguments

jp

JamPolygon

new_name

character string used to populate the "name" column in the output data. Only the first value is used, otherwise the first existing value in names(jp) is kept.

...

additional arguments are ignored.

Value

JamPolygon after applying the intersection

See Also

Other JamPolygon: JamPolygon-class, Venndir-class, [,JamPolygon,ANY,ANY,ANY-method, add_orientation_JamPolygon(), area_JamPolygon(), bbox_JamPolygon(), buffer_JamPolygon(), check_JamPolygon(), check_Venndir(), eulerr_to_JamPolygon(), farthest_point_JamPolygon(), find_venn_overlaps_JamPolygon(), has_point_in_JamPolygon(), label_fill_JamPolygon(), label_outside_JamPolygon(), label_segment_JamPolygon(), labelr_JamPolygon(), minus_JamPolygon(), nearest_point_JamPolygon(), nudge_JamPolygon(), plot.JamPolygon(), point_in_JamPolygon(), polyclip_to_JamPolygon(), polygon_circles(), polygon_ellipses(), sample_JamPolygon(), split_JamPolygon(), union_JamPolygon(), update_JamPolygon()

Examples

df3 <- data.frame(name=c("polygon1", "polygon2"),
   label=c("polygon1", "polygon2"),
   x=I(list(
      list(c(1, 6, 6, 1),
         c(2, 5, 5, 2),
         c(3, 4, 4, 3)),
      list(
         c(12, 15, 15, 12) - 7.5,
         c(13, 14, 14, 13) - 7.5)
   )),
   y=I(list(
      list(c(1, 1, 6, 6),
         c(2, 2, 5, 5),
         c(3, 3, 4, 4)),
      list(
         c(2, 2, 5, 5),
         c(3, 3, 4, 4))
   )),
   fill=jamba::alpha2col(c("gold", "firebrick"), alpha=0.7))
jp3 <- new("JamPolygon", polygons=df3);
plot(jp3);

jp3i <- intersect_JamPolygon(jp3)
jp3i@polygons$fill <- "red"
jp3i@polygons$border <- "red3";
jp3i@polygons$border.lwd <- 3;
jp3c <- rbind2(jp3, jp3i)
plot(jp3c)

jmw86069/venndir documentation built on Dec. 14, 2024, 2:36 p.m.