# Source MODIS files (both data and geolocation)
# Code excluded from CRAN check because it depends on modiscdata
## Not run:
# library(devtools)
# library(modiscdata)
# moddir = system.file("extdata/2002raw/", package="modiscdata")
#
# # Get the matching data/geolocation file pairs
# fns_df = check_for_matching_geolocation_files_mod09nrt(moddir, modtxt="MOD09", geoloctxt="MOD03")
# fns_df
#
# # Resulting TIF files go in this directory
# tifsdir = getwd()
#
#
# # Box to subset
# ul_lat = 13
# ul_lon = -87
# lr_lat = 8
# lr_lon = -82
#
# for (i in 1:nrow(fns_df))
# {
#
# prmfn = write_MRTSwath_param_file_mod09nrt(prmfn="tmpMRTparams.prm", tifsdir=tifsdir,
# modfn=fns_df$mod09_fns[i], geoloc_fn=fns_df$mod03_fns[i], ul_lon=ul_lon, ul_lat=ul_lat,
# lr_lon=lr_lon, lr_lat=lr_lat)
# print(scan(file=prmfn, what="character", sep="\n"))
#
# }
# ## End(Not run)
Run the code above in your browser using DataLab