validate_poi: bbox from center point

View source: R/aoi_processing.R

validate_poiR Documentation

bbox from center point

Description

Get a bounding box from an x,y point and desired buffer distance

Usage

validate_poi(poi = NULL, product = NULL, buff = 0)

Arguments

poi

Numeric; length-2 vector of x, y coordinates or 'sf' style point.

product

Character, one of the options from column 'Short_Name' in slga_product_info.

buff

Integer, cell buffer around point. Defaults to 0 (single cell).

Value

sf style bbox or list of same, aligned to requested product, centered on 'point' and extending 'buff' cells away from centre.

Note

This is for buffered data requests around a point.

Examples

{
library(slga)
poi <- c(152, -27)

# size 0 = extent of single cell
slga:::validate_poi(poi = poi, product = 'SLPPC', buff = 0)

# size 3 = 7x7 cells (centre cell and 3 in each direction)
slga:::validate_poi(poi = poi, product = 'SLPPC', buff = 3)
}


obrl-soil/slga documentation built on Feb. 3, 2024, 4:31 a.m.