Returns a data.table, data.frame, or SpatVector object of unprojected (lonlat) points.
Arguments
nobs
Number of observations
xmin
Minimum longitude
xmax
Maximum longitude
ymin
Minimum latitude
ymax
Maximum latitude
output_type
type of output object. Either "data.table" (default), "data.frame", or "SpatVector".
Details
By default, the function draws a global sample of random locations. You can restrict it to a certain region via specifying xmin,
xmax, ymin, and ymax. The function draws from a uniform spatial distribution that assumes the planet to be a perfect sphere. The
spherical assumption is common in GIS functions, but deviates from Earth's exact shape.