as_coordinates function

Get cell number, row and column from a SpatRaster