R/helpers.R

Defines functions insane_longitude_warning

# check for sane longitude bounds of drawn features - latitude is always -90/90
insane_longitude_warning = function() {
  if (requireNamespace("crayon", quietly = TRUE)) {
    warning(crayon::bgRed(crayon::white("\ndrawn features lie outside standard longitude bounds (-180 to 180) which is likely to cause trouble later!!")),
            call. = FALSE)
  } else {
    warning("\ndrawn features lie outside standard longitude bounds (-180 to 180) which is likely to cause trouble later!!",
            call. = FALSE)
  }
}

Try the mapedit package in your browser

Any scripts or data that you put into this service are public.

mapedit documentation built on Feb. 3, 2020, 1:07 a.m.