GetSubset.Rd 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. \name{GetSubset}
  2. \alias{GetSubset}
  3. \title{Subset download using MODIS web service method.}
  4. \description{Internal function that uses the MODIS SOAP Web Service (see references) getsubset method to download a requested time-series subset of a MODIS product for a given area surrounding many locations. This function is used by the MODISSubsets function, which is the main subset download tool for the user.}
  5. \usage{GetSubset(Lat, Long, Product, Band, StartDate, EndDate, KmAboveBelow, KmLeftRight)}
  6. \arguments{
  7. \item{Lat}{Numeric; a decimal degrees latitude in WGS-1984 coordinate system.}
  8. \item{Long}{Numeric; a decimal degrees longitude in WGS-1984 coordinate system.}
  9. \item{Product}{A character string; a product code to request the subset from. The MODIS product table shows all available products and their respective product titles (see references).}
  10. \item{Band}{A character string; a code or vector of codes to retrieve the desired data band(s) within the specified product to be requested. To get a list of the available bands in a product of interest use GetBands().}
  11. \item{StartDate}{Character; in MODIS date format, listing the date to begin the time-series for each corresponding location.}
  12. \item{EndDate}{Character; in MODIS date format, listing the date to end the time-series for each corresponding location.}
  13. \item{KmAboveBelow}{An integer; the distance, in kilometres, from the centre of the tile of pixels to the top and bottom of the tile. So, if KmAboveBelow=1, the total distance from top to bottom of the tile will be 2km.}
  14. \item{KmLeftRight}{An integer; the distance, in kilometres, from the centre of the tile of pixels to the left and right sides of the tile. So, if KmLeftRight=1, the total distance from side to side of the tile will be 2km.}
  15. }
  16. \value{A data frame containing:
  17. xll=The x coordinate, in the MODIS coordinate system, of the lower left corner of the pixel in which the location data falls.
  18. yll=The y coordinate, in the MODIS coordinate system, of the lower left corner of the pixel in which the location data falls.
  19. pixelsize=The actual calculated width of the pixels of interest, in metres.
  20. nrow=Corresponds to KmAboveBelow argument.
  21. ncol=Corresponds to KmLeftRight argument.
  22. band=Corresponds to band argument.
  23. scale=The number by which raw downloaded data values can be scaled by. Specific to each band.
  24. lat=Corresponds to the Lat argument.
  25. long=Corresponds to the Long argument.
  26. subset=The downloaded data, as a vector of character strings, with length number of time-steps requested, that include data attached to metadata.
  27. This data frame is then passed to MODISSubsets.}
  28. \references{
  29. \url{https://daacmodis.ornl.gov/cgi-bin/MODIS/GLBVIZ_1_Glb/modis_subset_order_global_col5.pl}
  30. }
  31. \author{Sean Tuck}
  32. \seealso{\code{\link[MODISTools:MODISSubsets]{MODISSubsets}}}
  33. \examples{
  34. \dontrun{
  35. # dontrun() used because running the example requires internet access,
  36. # and takes over a minute to run.
  37. data(SubsetExample)
  38. GetSubset(Lat=SubsetExample[ ,1], Long=SubsetExample[ ,2], Product="MOD13Q1",
  39. Band="250m_16_days_EVI", StartDate="A2001001", EndDate="A2001025",
  40. KmAboveBelow=0, KmLeftRight=0)}
  41. }