GetAcquisitionPlan {spectator}R Documentation

Gets a satellite acquisition plan

Description

Retrieves the acquisition plans for the Sentinel 1 & 2 and Landsat 8 & 9 satellites.

Usage

GetAcquisitionPlan(satellites = NULL, date = NULL)

Arguments

satellites

character vector, if specified only the listed satellites will be retrieved, if NULL (default value) the acquisition plans for all possible satellites will be retrieved. For simplicity, the satellites names can be abbreviated to "S-1A", "S-1B", "S-2A", "S-2B", "L-8", "L-9" or "S1A", "S1B", "S2A", "S2B", "L8", "L9". Default: NULL

date

date or character convertible to date by as.Date, indicating the day for which the acquisition plans are requested. If NULL (default value), today's date is used. If too far in the future, will return empty data set. Default: NULL

Details

For Sentinels the acquisition plans usually have a range of 10-15 days, while for Landsat-8 it is 2-4 days. The time range that you can view is limited to 24 hours due to a large number of polygons.

Value

Object of class 'sf' with 'POLYGON' geometry type. The attributes of the output will vary, depending on the satellite. For more information check out acquisition plan file descriptions for Sentinel-1, Sentinel-2, Landsat-8, Landsat-9

Data source

Based on the files provided by ESA (Sentinel-1, Sentinel-2) and USGS (Landsat-8), more information available on the above mentioned web pages.

Source

https://api.spectator.earth/#acquisition-plan

Examples

if(interactive()){
 library(sf)
 # get plans for all eligible satellites for today
 plans <- GetAcquisitionPlan()
 # explore the content of the data frame, 
 # -> you'll see that the available attributes vary with the satellite
 # focus on Sentinel 2
 sat <- c("Sentinel-2A", "Sentinel-2B")
 # day after tomorrow
 day <- Sys.Date()  + 2
 plan <- GetAcquisitionPlan(satellites = sat, date = day)
 # do some nice graphs
 library(maps)
 map("world", fill = TRUE, col = "lightgrey")
 plot(st_geometry(plan), border = "red", add = TRUE)
 title(main = sprintf("%s acquisition plan for %s", paste(sat, collapse = "/"), day))
 }

[Package spectator version 0.2.0 Index]