R/22_removeBackground.R

Defines functions gadm_removeBackground.gadm_sp gadm_removeBackground.gadm_sf

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
}
IamKDO/GADMTools documentation built on Aug. 23, 2021, 5:14 a.m.