rsMove (version 0.2.8)

moveCloud: moveCloud

Description

Provides historical information on cloud cover for a set of coordinate pairs. The temporal information is adjusted to the sample observation date.

Usage

moveCloud(x, y, data.path = NULL, buffer.size = NULL, remove.file = FALSE)

Arguments

x

Object of class Date with observation dates of y.

y

Object of class SpatialPoints or SpatialPointsDataFrame.

data.path

Output data path for downloaded data.

buffer.size

Two element vector with temporal buffer size (expressed in days).

remove.file

Logical. Should the files be deleted after usage?

Value

A list object reporting on the variability of cloud cover within and around each observation dates.

Details

This function uses daily cloud fraction data from NASA's NEO service. For each observation date in obs.dates, the function downloads the correspondent image and extracts the percent cloud cover for the corresponding samples in y. Before downloading any data, the function will look within data.path for previoulsy acquired data. If they exist, they won't be downloaded reducing the processing time required by the function. Moreover, if buffer.size is specified, for each date, the function will download all images that are within the specified temporal buffer. buffer.size requires a twoelement vector which specifies the buffer size before and after the target dates. These additional images will be used to report on the closest time step with the lowest possible cloud cover. The final output provides a data.frame ($report) with information on:

  • cloud cover % (day): cloud cover for the observation dates.

  • best date (after): dates before the observation dates with the lowest cloud cover.

  • best date cloud cover % (before): cloud cover for best before dates.

  • best date (after): dates after the observation dates with the lowest cloud cover.

  • best date cloud cover % (after): cloud cover best after dates.

Finally, the function generates a plot ($plot) reporting on the variability of cloud cover and the number of observation registered in y for each date.

References

https://cneos.jpl.nasa.gov/

See Also

sMoveRes tMoveRes

Examples

Run this code
# NOT RUN {
 require(raster)

 # read movement data
 data(shortMove)

 # test function for 30 day buffer
 od <- as.Date(shortMove@data$date)
 c.cover <- moveCloud(shortMove, od, data.path=".", buffer.size=c(30,30))

# }

Run the code above in your browser using DataLab