R/22_removeBackground.R

Defines functions gadm_removeBackground.gadm_sf gadm_removeBackground.gadm_sp

gadm_removeBackground.gadm_sf <- function(x) {
  if (x$hasBGND == FALSE) {
    warning("Map has no background.")
    return(x)
  }
  
  x$hasBGND <- FALSE
  x$BGND    <- NULL
  
  x
}

gadm_removeBackground.gadm_sp <- function(x) {
  if (x$hasBGND == FALSE) {
    warning("Map has no background.")
    return(x)
  }
  
  x$hasBGND <- FALSE
  x$BGND    <- NULL
  
  x
}
Epiconcept-Paris/GADMTools documentation built on March 6, 2020, 10:24 a.m.