Skip to contents

An extended version of sf::st_difference that uses the flip parameter to optionally call sf::st_intersection and combines and unions the second object by default. st_trim is st_erase with flip set to TRUE.

Usage

st_erase(x, y, flip = FALSE, union = TRUE)

st_trim(x, y, union = TRUE)

Arguments

x, y

sf objects

flip

If TRUE, use st_intersection; if FALSE use st_difference, Default: FALSE

union

If TRUE, use sf::st_combine and sf::st_union on y before applying difference/intersection, Default: FALSE