Hello, and congrats for the great package. Im having a problem when setting the extent. More specifically, I want to download time-series data of Landsat 5 and 8 for the years 1987 until 2017. The study region is Greece (path-row). Even though I am setting the extent (show them the particular code), when the download process is starting it takes scenes only from the west part of the study area (specify the path-row of the scenes). Any thoughts? Here is the code:
devtools::install_github("16EAGLE/getSpatialData")
Load packages
library(getSpatialData)
library(raster)
library(sf)
library(sp)
#instead of using an existing AOI, you can simply draw one:
set_aoi() #call set_aoi() without argument, which opens a mapedit editor:
set AOI for this session
view_aoi() #view AOI in viewer, which will look like this:
aoi = get_aoi(type = "sf")
After defining a session AOI, define time range and platform
time_range <- c("2010-01-01", "2010-02-31")
set login credentials and archive directory
login_USGS(username = "vanto") #asks for password or define 'password'
set_archive("C:/Users/Vanto/Desktop/test")
Use getSentinel_query to search for data (using the session AOI)
records <- getLandsat_query(time_range = time_range, aoi = aoi)
Filter the records
colnames(records) #see all available filter attributes
unique(records$levels_available) #use one of the, e.g. to see available processing levels
unique(records$product)
records_filtered <- records[which(records$levels_available == "'source_metadata', 'l1', 'toa', 'bt', 'sr', 'sr_ndvi', 'sr_evi', 'sr_savi', 'sr_msavi', 'sr_ndmi', 'sr_nbr', 'sr_nbr2', 'stats', 'pixel_qa'"),] #filter by Level
records_filtered <- records[which(records$product == "LANDSAT_TM_C1"),] #filter by Level
records_filtered <- records_filtered[as.numeric(records_filtered$SceneCloudCover) <= 10, ] #filter by clouds
View records table
View(records)
View(records_filtered)
#browser records or your filtered records
getLandsat_preview(record = records_filtered[6,])