Closed jstagge closed 7 months ago
ne_download() downloads the raster properly and unzips, but when reading in the file, the path adds an extra file name.
This pull request deletes the file name. It runs properly on my test code:
require(tidyverse) library(rnaturalearth) require(stars) require(sf)
background_orig <- ne_download(scale = 10, type = 'HYP_LR_SR_W_DR', category = 'raster')
bb = st_bbox(c(xmin = -115, ymin = 25, xmax = -100, ymax = 50), crs = st_crs(background_orig)) background <- st_as_stars(background_orig, proxy= FALSE) %>% st_crop(bb) %>%st_rgb(3)
plot(background)
ne_download() downloads the raster properly and unzips, but when reading in the file, the path adds an extra file name.
This pull request deletes the file name. It runs properly on my test code:
require(tidyverse) library(rnaturalearth) require(stars) require(sf)
background_orig <- ne_download(scale = 10, type = 'HYP_LR_SR_W_DR', category = 'raster')
bb = st_bbox(c(xmin = -115, ymin = 25, xmax = -100, ymax = 50), crs = st_crs(background_orig)) background <- st_as_stars(background_orig, proxy= FALSE) %>% st_crop(bb) %>%st_rgb(3)
plot(background)