Skip to content

Commit

Permalink
correctly returning the filename in ne_download() (closes #98)
Browse files Browse the repository at this point in the history
  • Loading branch information
PMassicotte committed Feb 16, 2024
1 parent add8ee4 commit fc39989
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
12 changes: 12 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

- `rnaturalearth` now requires rnaturalearthdata (>= 1.0.0) and rnaturalearthhires (>= 1.0.0).

-

```r
ne_download(
type = "MSR_50M",
category = "raster",
scale = 50,
load = TRUE
)

```

# rnaturalearth 1.0.1

- Do not test functions who rely on `rnaturalearthhires` because it is not available on CRAN.
Expand Down
4 changes: 4 additions & 0 deletions R/ne_download.R
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ ne_download <- function(
)
return(spatial_object)
} else {
file_name <- switch(category,
"raster" = file.path(destdir, file_name, paste0(file_name, ".tif")),
file.path(destdir, paste0(file_name, ".shp"))
)
return(file_name)
}
}

0 comments on commit fc39989

Please sign in to comment.