powered by
get terra to produce same output as raster::rasterToPoints
rasterToPoints2(rast)
A raster to convert to points