Skip to contents

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 as SpatVector attributes. Default is TRUE.

specific_values

character. Specific subset of columns to include as attributes if include_values = TRUE.

sort_geom

logical. Whether to sort key the data.table input by 'geom', 'part', and 'hole' columns.

See also