
throw
throw.Rd
This function creates a sample of points for extracting data from a grid. It generates a grid of points or polygons over a specified region, and assigns each grid cell a specific time interval. The points can be used for extracting data from raster or other spatial data sources.
Arguments
- offset
A numeric vector of length 2 indicating the offset from the origin for the grid. Default is c(-180, -90).
- cellsize
A numeric vector of length 1 or 2 indicating the size of the cells in the grid. Default is c(10, 10).
- n
A numeric vector of length 1 or 2 indicating the number of cells in the grid in the x and y directions. Default is c(36, 18).
- time_interval
An interval object from the lubridate package, indicating the time span for each point. Alternatively, a single date, which will be interpreted as an interval over that day by envfetch.
- crs
A coordinate reference system object from the sf package. Default is sf::st_crs(4326), which is the WGS 84 geographic coordinate system.
- what
A string indicating what kind of geometries to return: 'centers' for point geometries in the center of the cells, 'polygons' for polygon geometries filling the cells. Default is 'centers'.
- square
A logical indicating whether to use square cells. Default is TRUE.
- flat_topped
A logical indicating whether to use flat-topped or pointy-topped hexagon cells. Ignored if square is TRUE. Default is FALSE.