Description Usage Arguments Details Methods Note Author(s) See Also Examples
Downloads MODIS grid data from archive (FTP or local) and processes the files.
1 2 3 |
product |
See: |
collection |
Default is to download most recent collection version. See: |
begin |
Default is from the beginning of data. See: |
end |
Default is to the end of data. See: |
extent |
Default is NULL for interactive selection. See: |
tileH |
Numeric. Default is NULL for interactive selection. See: |
tileV |
Numeric. Default is NULL for interactive selection. See: |
buffer |
Numeric. Buffer [in units of the 'outProj'] around the specified extent. See: |
SDSstring |
Default is extract all SDS (layers). See: |
job |
Character name. Name of the current job for the creation of the output folder. If not specified it is created: 'PRODUCT.COLLECTION_DATETIME'. |
checkIntegrity |
Default |
wait |
Numeric. Time to wait to re-try a un-successful online connection (URL listenting or 'download.file()' process). Keep it small, max ~1 sec. |
quiet |
Logical, Default |
... |
See section 'Methods'. |
runGdal()
uses a lot of 'MODIS'-package functions, see in section 'arguments' and 'methods' the respective '?function' for details and inputs.
If extent
is a raster* object, the output has exactly the same extent, pixel size and projection as the used raster* object.
If extent
is a spatial* object (ie polygon shapefile), the output has exactly the same extent and projection as the used spatial* object.
If tileH
and tileV
arguments are used (instead of extent
) to define tha area of interest and outProj
amd pixelSize
are 'asIn'
the result is only converted from multilayer-HDF to dataFormat
, default "GeoTiff" (?MODISoptions()
).
outProj | CRS/ prj4 or EPSG code of output, any format supported by gdal see examples. | |
Default is 'asIn' (no warping). See ?MODISoptions . |
||
pixelSize | Numeric single value. Output pixel size in target reference system unit. | |
Default is 'asIn'. See ?MODISoptions . |
||
resamplingType | Character. Default is 'near', can be one of: 'bilinear', 'cubic', 'cubicspline', 'lanczos'. | |
See ?MODISoptions . |
||
blockSize | integer. Default NULL that means the stripe size is set by GDAL. |
|
Basically it is the "-co BLOCKYSIZE=" parameter. See: http://www.gdal.org/frmt_gtiff.html | ||
compression | logical. Default is TRUE , compress data with the lossless LZW compression with "predictor=2". |
|
See: http://www.gdal.org/frmt_gtiff.html | ||
dataFormat | Data output format, see getOption("MODIS_gdalOutDriver") column 'name'. |
|
localArcPath | Character. See ?MODISoptions . Local path to look for and/or to download MODIS files. |
|
outDirPath | Character. See ?MODISoptions . Root directory where to write job folder. |
|
You need to have a GDAL installed on your system!
http://www.gdal.org/gdal_utilities.html
On Unix-alkes install 'gdal-bin' (I.e. Ubuntu: 'sudo apt-get install gdal-bin')
On Windows you need to install GDAL through OSGeo4W (http://trac.osgeo.org/osgeo4w/) or FWTools (http://fwtools.maptools.org/) since the standard GDAL does not support HDF4 format
Matteo Mattiuzzi
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | ## Not run:
# LST in Austria
runGdal( product="MOD11A1", extent="austria", begin="2010001", end="2010005", SDSstring="101")
# LST with interactiv area 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.