Skip to contents

Convert x,y nodes to sf polygons

Usage

grid2sf(
  spe,
  x = spe@metadata$grid_density$node_x,
  y = spe@metadata$grid_density$node_y
)

Arguments

spe

A SpatialExperiment object with grid density calculated

x

vector of x nodes of the polygons

y

vector of y nodes of the polygons

Value

List of sf polygons

Details

Default is to generate sf polygons for all grid. For plotting, use sf::st_as_sfc(grid2sf2(spe)) to convert list into Geometry Set.