View source: R/GetAcquisitionPlan.R
| GetAcquisitionPlan | R Documentation |
Retrieves the acquisition plans for the Sentinel 1 & 2 and Landsat 8 & 9 satellites.
GetAcquisitionPlan(satellites = NULL, date = NULL)
satellites |
character vector, if specified only the listed satellites will be retrieved,
if |
date |
date or character convertible to date by |
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.
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
Based on the files provided by ESA (Sentinel-1, Sentinel-2) and USGS (Landsat-8), more information available on the above mentioned web pages.
https://api.spectator.earth/#acquisition-plan
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))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.