Skip to contents

Construct boundary box from sf package

Usage

make_bbox(stn = NULL, dx = stn$dx)

Arguments

stn

A SpatVector or an array of two coordinates in UTM 33 (epsg:25833)

dx

A distance in metre to compute the box boundary as a distance from the centre point

Value

A bbox object

Examples

# Get station metadata
stn <- get_metadata_frost(stationid = 18700)

# Define boundary box from SpatVector
box <- make_bbox(stn, dx = 1600)

# Get coordinates matrix and define boundary box
centre <- terra::crds(stn)
box <- make_bbox(centre, dx = 1600)