knitr::opts_chunk$set( comment = "#>", collapse = TRUE, warning = FALSE, message = FALSE, fig.path = "img/" )
getlandsat
provides access to Landsat https://landsat.usgs.gov 8 metadata and images hosted on AWS S3 at https://aws.amazon.com/public-data-sets/landsat. The package only fetches data. It does not attempt to aid users in downstream usage, but some additional functionality may be added.
Potential users are probably anyone from scientists asking questions about biodiversity or land use change, to software developers creating tools for users to vizualize their data.
Dev version
devtools::install_github(c("ropensci/getlandsat"))
library("getlandsat")
lsat_cache_delete_all()
(res <- lsat_scenes(n_max = 10))
lsat_scene_files(x = res$download_url[1])
Returns path to the image
lsat_image(x = "LC80101172015002LGN00_B5.TIF")
Another one
lsat_image("LC80010032014272LGN00_B10.TIF")
When requesting an image, we first check if you already have that image. If you do, we return the path to the file. If not, we get the image, and return the file path.
lsat_image(x = "LC80101172015002LGN00_B5.TIF")
Note the message given.
See ?lsat_cache
for cache management functions.
library("raster") x <- lsat_cache_details() img <- raster(x[[1]]$file) plot(img)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.