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
.
Arguments
- x, y
sf objects
- flip
If
TRUE
, use st_intersection; ifFALSE
use st_difference, Default:FALSE
- union
If
TRUE
, use sf::st_combine and sf::st_union on y before applying difference/intersection, Default:FALSE