Learn R Programming

RGISTools (version 0.9.7)

senPreview: Preview Sentinel-2 satellite images

Description

senPreview shows a preview of the n-th image from a set of search results.

Usage

senPreview(searchres, username, password, n, size = NULL)

Arguments

searchres

a vector with the results from senSearch.

username

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

password

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

n

a numeric argument identifying the row of the image in searchres.

size

a numeric argument specifying the size of the preview to be displayed, in pixels.

Details

The function shows a preview of the n-th output image from a search in Sentinel archives (modSearch). The preview is downloaded from `SciHub's' website. Please, be aware that only some images may have a preview. Credentials from an ESA<U+2019>s `SciHub' account are needed, which can be obtained here.

Examples

Run this code
# NOT RUN {
# load a spatial polygon object of Navarre
data(ex.navarre)
# perform the search query
searchres <- senSearch(startDate = as.Date("2018210","%Y%j"),
                       endDate = as.Date("2018218","%Y%j"),
                       platform = "Sentinel-2",
                       extent = ex.navarre,
                       product = "S2MSI1C",
                       username = "username",
                       password = "password")
# preview some images
senPreview(searchres, 3, username = "username", password = "password")
senPreview(searchres, 1, username = "username", password = "password", 600)

# show the dates in julian days
senGetDates(names(searchres),format="%Y%j")
# }

Run the code above in your browser using DataLab