Learn R Programming

RGISTools (version 1.0.2)

senSearch: Search Sentinel images

Description

senSearch searches Sentinel images through ESA's powered application programming interface (API), called `SciHub', that concern a particular location and date interval. The function returns a data.frame with the names of the images and their uniform resource locators (URLs).

Usage

senSearch(username, password, ...)

Arguments

username

ESA<U+2019>s `SciHub' username.

password

ESA<U+2019>s `SciHub' password.

...

arguments for nested functions:

  • product the type of Sentinel product. Ex. "S2MSI1C", "S2MSI2A", "S2MSI2Ap", ...

  • dates a vector with the capturing dates being searched. This argument is mandatory if startDate and endDate are not defined.

  • startDate a Date class object with the starting date of the study period. This argument is mandatory if dates is not defined.

  • endDate a Date class object with the ending date of the study period. This argument is mandatory if dates is not defined.

  • region a Spatial*, projected raster*, or sf class object defining the area of interest. This argument is mandatory if extent or lonlat are not defined.

  • extent an extent, Raster*, or Spatial* object representing the region of interest with longitude/latitude coordinates. This argument is mandatory if region or lonlat are not defined.

  • lonlat a vector with the longitude/latitude coordinates of the point of interest. This argument is mandatory if region or extent are not defined.

  • platform the name of the Sentinel mission ("Sentinel-1", "Sentinel-2", ...).

  • qformat the format of the response.

  • verbose logical argument. If TRUE, the function prints the running steps and warnings.

Details

senSearch uses the ESA's powered API (`SciHub').The catalogue of Sentinel-2 products can be found here. The function explores the images available for a specific location and time-span. Dates must be provided as Date class objects. Credentials from ESA<U+2019>s `SciHub' are needed and they can be obtained here.

Examples

Run this code
# NOT RUN {
# load a spatial polygon object of Navarre
data(ex.navarre)
# perform the search query
sres <- senSearch(startDate = as.Date("2018210", "%Y%j"),
                  endDate = as.Date("2018218", "%Y%j"),
                  platform = "Sentinel-2",
                  region = ex.navarre,
                  product = "S2MSI1C",
                  username = "username",
                  password = "password")
head(sres)
# }

Run the code above in your browser using DataLab