Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directory issue for rasters #52

Closed
wants to merge 2 commits into from
Closed

Conversation

jstagge
Copy link

@jstagge jstagge commented Feb 10, 2022

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)

The previous version downloaded properly, but added an extra filename in the path. This appears to work now.
Updated ne_download for rasters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant