Row bind coverage for a feature based on a coverage feature
Source:R/bind_sf_coverage.R
bind_sf_coverage.Rd
Usage
bind_sf_coverage(
x,
coverage,
coverage_nm = NULL,
.id = "name",
x_arg = caller_arg(x),
coverage_arg = caller_arg(coverage),
id_arg = caller_arg(.id),
combine = FALSE,
error_call = caller_env()
)
st_make_valid_coverage(
x,
y,
combine = FALSE,
is_coverage = TRUE,
.fn = sf::st_difference
)
st_make_valid_union(x, combine = FALSE, is_coverage = TRUE)
Arguments
- x
A input sf object
- coverage
A sf, sfc, or bbox object that covers x.
- coverage_nm
Name to use for coverage feature assigned as value for .id column, Default:
NULL
- .id
.id column name, must be present in x Default: 'name'
- x_arg, coverage_arg, id_arg
Argument names for error messages if
bind_sf_coverage()
is used as a wrapper function.- combine
If
TRUE
, usesf::st_combine()
before passing x tosf::st_union()
- error_call
The execution environment of a currently running function, e.g.
caller_env()
. The function will be mentioned in error messages as the source of the error. See thecall
argument ofabort()
for more information.- y
Second parameter for
st_make_valid_coverage()
- is_coverage
logical; if
TRUE
, use an optimized algorithm for features that form a polygonal coverage (have no overlaps)- .fn
Defaults to sf::st_difference
Details
bind_sf_coverage()
and the related helper functions
st_make_valid_coverage()
and st_make_valid_union()
take a sf object and
create a non-intersecting coverage area of a surrounding geography defined by
a second sf, sfc, or bbox object. This was originally developed for the
make_area_xwalk()
function in the getACS package.