stars_pts_to_loc | R Documentation |
Convert a sf POINTS object with a band variable into stars object to row, col, cell x, y, and band location coordinates (cell centers).
stars_pts_to_loc(
pts = dplyr::select(stars_index_to_loc(form = "sf"), dplyr::all_of("band")),
x = toy_multi(nb = 3, nc = 5, nr = 4, mask = FALSE),
form = c("table", "sf")[1]
)
pts |
sf POINT object with one variable whose name matches the name of the band dimension
in the |
x |
stars object. Limited to [x,y] of [x,y, band] dimensions |
form |
character, specifies output format as "table" (default) or "sf" |
a tibble of index, cell, col, row, x, y, and layer
index, 1-based 3d index into objects if as array
cell, 1-based 2d index into each band as if a matrix
col, 1-based column index
row, 1-based row index
x, coordinate of center of cell (not original input x value), missing if form
is 'sf'
y, coordinate of center of cell (not original input y value), missing if form
is 'sf'
band, 1-based integer index of band (note original band value)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.