Adds a new attribute "Z" to the input points sf object based on the input dem.

sf_get_z(points, dem)

Arguments

points

sf object;

dem

terra SpatRast object;

Value

point sf object with new field containing dem z