Combine ROIs geometrically. Each accepts several sg_roi via ..., or a
single sg_roi_layer. Multi-part results are returned as one ROI with
MULTIPOLYGON geometry (the return type is always a single sg_roi).
Usage
sg_roi_union(..., call = rlang::caller_env())
sg_roi_intersect(..., call = rlang::caller_env())
sg_roi_difference(..., call = rlang::caller_env())
sg_roi_symdiff(..., call = rlang::caller_env())Arguments
- ...
Two or more sg_roi, or a single sg_roi_layer.
- call
The calling environment, for error reporting.
Value
A single sg_roi with source = "derived".
See also
Other geometry:
sg_roi_buffer(),
sg_roi_check_containment(),
sg_roi_check_geometry(),
sg_roi_clamp(),
sg_roi_contains(),
sg_roi_distance(),
sg_roi_fix_geometry(),
sg_roi_flip_y(),
sg_roi_overlaps(),
sg_roi_rescale(),
sg_roi_ring(),
sg_roi_rois_overlap(),
sg_roi_simplify(),
sg_roi_snap(),
sg_roi_transform()
Examples
a <- sg_roi_rect(0, 0, 6, 6, label = "x")
b <- sg_roi_rect(4, 4, 10, 10, label = "x")
sg_roi_area(sg_roi_intersect(a, b))
#> [1] 4