Create a set of training points with associated elevation and BGC values.

makePointCoords(bgc_poly, elev, gridSize = 2000, crs = "EPSG:4326")

Arguments

bgc_poly

an sf object (or one cohercible to an sf object) of BGC polygons.

elev

a SpatRaster or RasterLayer of elevation covering the extent of bgc_poly.

gridSize

numeric. Distance in m between points.

crs

passed to sf::st_as_sf()

Value

a data.table of point coordinates with associated IDs, elevation and BGCs.

Details

Points are sampled regularly from a grid with cell size defined by gridSize that covers bgc_poly.