
Generate a Rasterized Buffer Around Species Occurrences and Convert to Long Format
Source:R/buffer.R
make_buffer_rasterized.RdThis function takes species occurrence data, generates a buffer around each occurrence point, rasterizes the buffer onto a given raster template, and converts the resulting raster data into a long-format data.table. The buffer distance can be specified by the user.
Arguments
- DT
A data.table or data.frame containing species occurrence data. The data should include the columns:
decimalLatitude,decimalLongitude,family,genus, andspecies.- file
A file path to the raster file that will be used as a template for rasterizing the buffers.
- dist
A numeric value specifying the buffer distance in meters. Default is 500 meters.