st_point2poly.Rdst_point2poly
st_point2poly(xyz, crs = 4326)
df2rast(xyz)
rast2poly(r, crs = 4326)
st_dissolve(x, by = NULL, ...)A matrix or data frame whose first two columns are x and y; the optional third column contains values.
A coordinate reference system accepted by sf::st_crs().
https://gis.stackexchange.com/questions/192771/how-to-speed-up-raster-to-polygon-conversion-in-r