Description Usage Arguments Details Value Examples
Get cell number(s) of a Raster* object from x and y coordinates.
1 | cellFromXY(object, xy)
|
object |
Raster* object (or a SpatialPixels* or SpatialGrid* object) |
xy |
matrix of x and y coordinates, sf, SpatialPoints or SpatialPointsDataFrame object |
See cellFrom
for more details.
vector of cell numbers
1 2 | x <- read_sf(system.file("shape/nc.shp", package="sf"))
cellFromXY(raster(x), x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.