Skip to content

Commit

Permalink
add tiny blue marble internal data
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsumner committed Dec 2, 2018
1 parent d235014 commit b454c2b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Expand Up @@ -14,3 +14,4 @@
^docs$
^data/mapbox_sat.rda$
^man/figures/quadglobe.png$
^data-raw/world.topo.bathy.200412.3x5400x2700.png$
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -8,3 +8,4 @@ data/mapbox_sat.rda
vignettes/*.html
vignettes/*.R
data-raw/roms3d.rds
data-raw/world.topo.bathy.200412.3x5400x2700.png
Binary file added R/sysdata.rda
Binary file not shown.
12 changes: 12 additions & 0 deletions data-raw/blue-marble.R
@@ -0,0 +1,12 @@
u <- "https://eoimages.gsfc.nasa.gov/images/imagerecords/73000/73909/world.topo.bathy.200412.3x5400x2700.png"
f <- file.path("data-raw", basename(u))
if (!file.exists(f)) curl::curl_download(u, f)
library(lazyraster)
library(raster)
dm <- c(216, 108)
bm <- setExtent(raster::brick(as_raster(lazyraster::lazyraster(f, band = 1), dm),
as_raster(lazyraster::lazyraster(f, band = 2), dm),
as_raster(lazyraster::lazyraster(f, band = 3), dm,)),
extent(-180, 180, -90, 90))
projection(bm) <- "+init=epsg:4326"
usethis::use_data(bm, internal=TRUE)

0 comments on commit b454c2b

Please sign in to comment.