The 1:10 million Natural Earth land polygons (2.3 MB compressed) are not bundled
with the package. This fetches the pinned zip from Natural Earth, verifies
its SHA-256 against reference_info(), converts it and stores the result in
the user cache directory (tools::R_user_dir("OccurrenceCleaner", "cache")).
flag_occurrences() calls it when land_scale = 10 is requested and the
layer is not cached yet.
Usage
download_reference(
layer = "land_10",
cache_dir = tools::R_user_dir("OccurrenceCleaner", "cache"),
quiet = FALSE
)Examples
if (interactive()) {
download_reference()
x <- data.frame(decimalLongitude = c(12.58, -30), decimalLatitude = c(55.67, 40))
flag_occurrences(x, tests = "sea", land_scale = 10)$flag_sea
}