Test whether points fall inside an ROI
Usage
sg_roi_contains(roi, x, y, call = rlang::caller_env())Arguments
- roi
An sg_roi.
- x, y
Numeric coordinate vectors of equal length.
- call
The calling environment, for error reporting.
See also
Other geometry:
sg_roi_buffer(),
sg_roi_check_containment(),
sg_roi_check_geometry(),
sg_roi_clamp(),
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_setops,
sg_roi_simplify(),
sg_roi_snap(),
sg_roi_transform()
Examples
sg_roi_contains(sg_roi_rect(0, 0, 10, 10, label = "a"), c(5, 20), c(5, 20))
#> [1] TRUE FALSE