-
Notifications
You must be signed in to change notification settings - Fork 504
Closed
Description
When {terra}
is not loaded (e.g., individual {terra}
functions are imported into package namespace) functions that internally call check_crs_terra()
will fail. I think this is because check_crs_terra()
simply calls crs()
instead of terra::crs()
:
Lines 74 to 94 in d8c9794
check_crs_terra <- function(x) { | |
crs <- crs(x) | |
# Don't have enough information to check | |
if (is.na(crs) || (crs=="")) | |
return() | |
if (identical(terra::is.lonlat(x), FALSE)) { | |
warning("SpatVector layer is not long-lat data", call. = FALSE) | |
} | |
prj <- crs(x, proj=TRUE) | |
if (!grepl("+datum=WGS84", prj, fixed = TRUE)) { | |
warning( | |
"SpatVector layer has inconsistent datum (", prj, ").\n", | |
"Need '+proj=longlat +datum=WGS84'", | |
call. = FALSE | |
) | |
} | |
} |
I encounter this issue when calling addPolylines()
with SpatVector
objects.
Metadata
Metadata
Assignees
Labels
No labels