Download a MODIS Land Products Subset product for a given point location buffered with a given amount of kilometers left-right, top-bottom for a given location (provided as latitude and longitude values).

mt_subset(
  product,
  band,
  lat,
  lon,
  start = "2000-01-01",
  end = format(Sys.time(), "%Y-%m-%d"),
  km_lr = 0,
  km_ab = 0,
  site_id,
  network,
  site_name = "sitename",
  out_dir = tempdir(),
  internal = TRUE,
  progress = TRUE
)

Arguments

product

a valid MODIS product name

band

band or bands (as a character vector) to download

lat

latitude in decimal degrees

lon

longitude in decimal degrees

start

start date

end

end date

km_lr

km left-right to sample (rounded to the nearest integer)

km_ab

km above-below to sample (rounded to the nearest integer)

site_id

site id (overides lat / lon)

network

the network for which to generate the site list, when not provided the complete list is provided

site_name

arbitrary site name used in writing data to file (default = sitename)

out_dir

path where to store the data if writing to disk (default = tempdir())

internal

should the data be returned as an internal data structure TRUE or FALSE (default = TRUE)

progress

show download progress

Value

A data frame combining meta-data and actual data values.

See also

Examples

# \donttest{ # list all available MODIS Land Products Subsets products # download data subset <- mt_subset(product = "MOD11A2", lat = 40, lon = -110, band = "LST_Day_1km", start = "2004-01-01", end = "2004-03-31", progress = FALSE) head(subset)
#> xllcorner yllcorner cellsize nrows ncols band units #> 1.1 -9370036.39 4447802.08 926.625433055834 1 1 LST_Day_1km Kelvin #> 2.1 -9370036.39 4447802.08 926.625433055834 1 1 LST_Day_1km Kelvin #> 3.1 -9370036.39 4447802.08 926.625433055834 1 1 LST_Day_1km Kelvin #> 4.1 -9370036.39 4447802.08 926.625433055834 1 1 LST_Day_1km Kelvin #> 5.1 -9370036.39 4447802.08 926.625433055834 1 1 LST_Day_1km Kelvin #> 6.1 -9370036.39 4447802.08 926.625433055834 1 1 LST_Day_1km Kelvin #> scale latitude longitude site product start end complete #> 1.1 0.02 40 -110 sitename MOD11A2 2004-01-01 2004-03-31 TRUE #> 2.1 0.02 40 -110 sitename MOD11A2 2004-01-01 2004-03-31 TRUE #> 3.1 0.02 40 -110 sitename MOD11A2 2004-01-01 2004-03-31 TRUE #> 4.1 0.02 40 -110 sitename MOD11A2 2004-01-01 2004-03-31 TRUE #> 5.1 0.02 40 -110 sitename MOD11A2 2004-01-01 2004-03-31 TRUE #> 6.1 0.02 40 -110 sitename MOD11A2 2004-01-01 2004-03-31 TRUE #> modis_date calendar_date tile proc_date pixel value #> 1.1 A2004001 2004-01-01 h09v05 2015212185706 1 13098 #> 2.1 A2004009 2004-01-09 h09v05 2015212201022 1 13062 #> 3.1 A2004017 2004-01-17 h09v05 2015212213103 1 13297 #> 4.1 A2004025 2004-01-25 h09v05 2015213005429 1 13323 #> 5.1 A2004033 2004-02-02 h09v05 2015213090158 1 13315 #> 6.1 A2004041 2004-02-10 h09v05 2015213165253 1 13227
# }