Convert spatial object longitude to standard format
convert_2d_longitude_gridded.RdThis function converts the longitudinal coordinates of spatial objects from a 0-360 degree scale to a standard -180 to +180 degree scale. It accepts raw spatial objects or file paths and processes them into a standard list.
Arguments
- data.in
character vector, list, or SpatRaster. Single file path, vector of file paths, single SpatRaster, or list of SpatRasters/SpatVectors.
- write.out
logical. If TRUE, writes a netCDF file (requires output.files). If FALSE, returns a list of spatial objects. Default is FALSE.
- output.files
character vector. Paths for output files if write.out is TRUE. Default is NA.