Test whether a SpatRaster or SpatVector has a longitude/latitude coordinate reference system (CRS). couldBeLonLat returns TRUE if the CRS is unknown ("") but the x coordinates are within -181 and 181 and the y coordinates are within -90.1 and 90.1.
Usage
# S4 method for SpatRaster
isLonLat(x, ...)
# S4 method for SpatVector
isLonLat(x, ...)
# S4 method for SpatRaster
isGlobalLonLat(x, ...)
# S4 method for SpatRaster
couldBeLonLat(x, warn=TRUE, ...)
# S4 method for SpatVector
couldBeLonLat(x, warn=TRUE, ...)
Arguments
x
SpatRaster or SpatVector object
warn
logical. If TRUE, a warning is given if the CRS is unknown or when the CRS is longitude/latitude but the coordinates do not match that