getlandsat: Get Landsat 8 data from AWS public data sets

getlandsat provides access to Landsat https://landsat.usgs.gov 8 metadata and images hosted on AWS S3 at https://registry.opendata.aws/landsat-8/. The package only fetches data. It does not attempt to aid users in downstream usage, but some additional functionality may be added.

A new function lsat_search() lets you search for Landsat images by using the API from Development Seed documented at https://github.com/sat-utils/sat-api

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.

Install

Stable version

install.packages("getlandsat")

Dev version

devtools::install_github("ropensci/getlandsat")
library("getlandsat")

Search for images

{r eval=FALSE} x <- lsat_search(collection = "landsat-8", cloud_cover = c(0, 20), limit = 3)$features names(x) #> [1] "type" "properties" "bbox" "geometry" "assets" "links" x$properties #> id c:id datetime eo:cloud_cover eo:sun_azimuth #> 1 LC08_L1TP_183023_20160625_20170323_01_T1 landsat-8-l1 2016-06-25T09:00:16.825Z 0 150.61964 #> 2 LC08_L1TP_183037_20160625_20170323_01_T1 landsat-8-l1 2016-06-25T09:05:51.253Z 19 110.95730 #> 3 LC08_L1TP_183041_20160625_20170323_01_T1 landsat-8-l1 2016-06-25T09:07:26.830Z 0 95.69133 #> eo:sun_elevation landsat:path landsat:row #> 1 57.71269 183 23 #> 2 68.16356 183 37 #> 3 68.55517 183 41

Get an image

Returns path to the image

Caching

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.

Note the message given.

See ?lsat_cache for cache management functions.

Visualize

library("raster")
x <- lsat_cache_details()[[1]]
img <- raster(x$file)
plot(img)

plot of chunk unnamed-chunk-10

Meta

ropensci