R/30_gadm_longTo360.R

Defines functions gadm_longTo360.gadm_sf

# gadm_longTo360.gadm_sf --------------------------------------------------
# =========================================================================
gadm_longTo360.gadm_sf <- function(x) {
  .x <- x
  geom <- st_geometry(.x$sf)
  geom = (st_geometry(geom) + c(360,90)) %% c(360) - c(0,90)
  
  .x$sf$geometry <- geom
  .x
}

Try the GADMTools package in your browser

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

GADMTools documentation built on Aug. 5, 2021, 1:06 a.m.