runGdal | R Documentation |
Downloads MODIS grid files from archive (HTTP or local) and processes them.
runGdal( product, collection = NULL, begin = NULL, end = NULL, extent, tileH, tileV, SDSstring = NULL, job = NULL, checkIntegrity = TRUE, forceDownload = TRUE, overwrite = FALSE, maskValue = NULL, ... )
product |
|
collection |
|
begin, end |
|
extent |
Extent information, defaults to 'global'. See |
tileH, tileV |
|
SDSstring |
|
job |
|
checkIntegrity, forceDownload |
|
overwrite |
|
maskValue |
If |
... |
Additional arguments passed to |
outProj, pixelSize, resamplingType, dataFormat, localArcPath, outDirPath
:
See MODISoptions()
.
blockSize
: integer. If NULL
(default), the stripe size is set by GDAL.
Basically it is the -co BLOCKYSIZE=
parameter. See
https://gdal.org/frmt_gtiff.html.
compression
logical. If TRUE
(default), compress data with the lossless
LZW compression with predictor=2
. See https://gdal.org/frmt_gtiff.html.
runGdal()
uses numerous MODIS functions under the hood, see the linked
functions in Arguments for details and inputs.
If 'extent' is a Raster*
object, the output has exactly the same extent,
pixel size, and projection.
If 'extent' is a sp or sf object, the output has exactly the same
extent and projection except for point geometries with length 1 (i.e. a
single point) where only the projection is inherited.
If 'tileH' and 'tileV' are used (instead of 'extent') to define the area of
interest, and 'outProj' and 'pixelSize' are "asIn"
, the result is only
converted from multi-layer HDF to 'dataFormat', default "GTiff"
.
A list
of the same length as 'product'. Each product slot either holds a
sub-list
of processed dates which, for each time step, includes the
corresponding output files as character
objects or, if no files could be
found for the specified time period, a single NA
.
Matteo Mattiuzzi, Florian Detsch
getHdf()
, runMrt()
.
## Not run: # LST in Austria runGdal( product="MOD11A1", extent="austria", begin="2010001", end="2010005", SDSstring="101") # LST with interactive tile selection runGdal( product="MOD11A1", begin="2010001", end="2010005", SDSstring="101") ### outProj examples # LST of Austria warped to UTM 34N (the three different possibilites to specify "outProj") # to find am EPSG or prj4 you may use: prj <- make_EPSG() See runGdal( job="LSTaustria", product="MOD11A1", extent="Austria", begin="2010001", end="2010005", SDSstring="101", outProj="EPSG:32634") runGdal( job="LSTaustria", product="MOD11A1", extent="Austria", begin="2010001", end="2010005", SDSstring="101", outProj=32634) runGdal( job="LSTaustria", product="MOD11A1", extent="Austria", begin="2010001", end="2010005", SDSstring="101", outProj="+proj=utm +zone=34 +ellps=WGS84 +datum=WGS84 +units=m +no_defs") ### resamplingType examples runGdal( job="LSTaustria", product="MOD11A1", extent="Austria", begin="2010001", end="2010005", SDSstring="1", resamplingType="lanczos", outProj="32634", pixelSize=100) ### processing entire tiles and keeping Sinusoidal projection # This corresponds to a format conversion (eos-hdf04 to Geotiff) and # layer extraction (multi-layer to single layer) runGdal( job="LSTaustria", product="MOD11A1", tileH=18:19,tileV=4, begin="2010001", end="2010005", SDSstring="1", outProj="asIn") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.