oli.asw: Query AWS-OLI

View source: R/oli.aws.R

oli.aswR Documentation

Query AWS-OLI

Description

Query of Amazon AWS OLI-Landsat 8 cloud service

Usage

oli.asw(path, row, dates, cloud.cover = 10, processing)

Arguments

path

landsat path

row

landsat row

dates

dates, single or start-stop range in YYYY-MM-DD format

cloud.cover

percent cloud cover

processing

processing level ("L1GT" or "L1T")

Details

Amazons AWS cloud service is hosting OLI Landsat 8 data granules https://registry.opendata.aws/landsat-8 https://aws.amazon.com/blogs/aws/start-using-landsat-on-aws/

USGS Landsat collections: https://www.usgs.gov/landsat-missions Pre-collection processing levels: "L1T", "L1GT", "L1G" Collection 1 processing levels: "L1TP", "L1GT", "L1GS" "L1T" and "L1TP" - Radiomertically calibrated and orthorectified (highest level processing) "L1GT" and "L1GT" - Radiomertically calibrated and systematic geometric corrections "L1G" and "L1GS" - Radiomertically calibrated with systematic ephemeris correction

Value

data.frame object with:

  • entityId - Granule ID

  • L = Landsat

  • X = Sensor

  • SS = Satellite

  • PPP = WRS path

  • RRR = WRS row

  • YYYYMMDD = Acquisition date

  • yyyymmdd = Processing date

  • CC = Collection number

  • TX = Collection category

  • acquisitionDate - POSIXct YYYY-MM-DD (eg., 2015-01-02)

  • cloudCover -

  • processingLevel - USGS processing level

  • path - Landsat path

  • row - Landsat row

Author(s)

Jeffrey S. Evans <jeffrey_evans@tnc.org>

Examples


# Query path 126, row 59, 2013-04-15 to 2017-03-09, <20% cloud cover    
( p126r59.oli <- oli.asw(path=126, row=59, dates = c("2013-04-15", "2017-03-09"), 
                          cloud.cover = 20) )

# Download images from query
 bands <- c("_B1.TIF", "_B2.TIF", "_B3.TIF", "_B4.TIF", "_B5.TIF", 
            "_B6.TIF","_B7.TIF", "_B8.TIF", "_B9.TIF", "_B10.TIF",
         "_B11.TIF", "_BQA.TIF","_MTL.txt") 
  for(i in 1:length(p126r59.oli$download_url)) {
    oli.url <- gsub("/index.html","",p126r59.oli$download_url[i])
 all.bands <- paste(oli.url, paste0(unlist(strsplit(oli.url, "/"))[8], bands), sep="/")
   for(j in all.bands) {  
        try(utils::download.file(url=j, destfile=basename(j), mode = "wb"))
       }		 
  }



spatialEco documentation built on Nov. 18, 2023, 1:13 a.m.