helper function used to check that the input projection (passed as UTM zone, EPSG code, WKT string) is a valid projection for MODIStsp.
Usage
check_projection(projection, abort = FALSE, verbose = TRUE)
# S3 method for default
check_projection(projection, abort = FALSE, verbose = TRUE)
# S3 method for numeric
check_projection(projection, abort = FALSE, verbose = TRUE)
# S3 method for character
check_projection(projection, abort = FALSE, verbose = TRUE)
# S3 method for crs
check_projection(projection, abort = FALSE, verbose = TRUE)
Arguments
- projection
character
orinteger
corresponding to the an EPSG code, a UTM zone (e.g. "32N") or a WKT representation of a projection;- abort
logical
if TRUE, the function aborts in case an invalid invalid projection is passed. Otherwise, the function returns "NA", Default: TRUE- verbose
logical
if TRUE, return messages
Examples
if (FALSE) {
check_projection("32632")
check_projection("32631")
check_projection(32633)
check_projection(30, abort = FALSE)
check_projection("example of invalid string", abort = FALSE)
proj_wkt <- sf::st_as_text(sf::st_crs(32632))
check_projection(proj_wkt)
}