Coerce to SpatVector polygons
as.polygons.Rd
Coversion to a SpatVector of polygons.
Usage
# S4 method for data.frame
as.polygons(
x,
include_values = TRUE,
specific_values = NULL,
sort_geom = FALSE
)
Arguments
- x
SpatRaster, SpatVector, SpatExtent, or correctly formatted data.frame
- include_values
logical
. Whether to include additional columns other than the geometry information asSpatVector
attributes. Default is TRUE.- specific_values
character
. Specific subset of columns to include as attributes ifinclude_values = TRUE
.- sort_geom
logical
. Whether to sort key the data.table input by 'geom', 'part', and 'hole' columns.
See also
Other As coercion functions:
as.data.table()
,
as.points()
,
r_spatial_conversions