使用 MODIS 包下载 MODIS 数据

downloading MODIS data using MODIS package

我正在尝试使用 MODIS 包下载产品 (MOD15A2H),但在 runGdal 命令期间收到“error in rgdal::rawTransform”。

有没有人有什么想法?

这是我的脚本...

library(MODIS)

## set relevant options
MODISoptions(localArcPath = "c:/MODIS/temp",
             outDirPath = "c:/temp/MODIS/processed",
             MODISserverOrder = c("LAADS", "LPDAAC"),
             gdalPath = "C:/OSGeo4W64/bin/")

## get latest product collection
cll <- getCollection(product = "MOD15A2H", forceCheck = TRUE)

## download and extract data
tfs <- runGdal(product = "MOD15A2H", collection = cll,
               tileH = 11, tileV = 4, 
               begin = "2017001", end = "2017100", 
               SDSstring = "101100",
               outProj="EPSG:32615")

下面是控制台中的消息...

> library(MODIS)
Loading required package: mapdata
Loading required package: maps
Loading required package: raster
Loading required package: sp
'localArcPath' does not exist, and will be created in 'c:/MODIS/temp/'. Consult '?MODISoptions' if you want to change it!

Warning messages:
1: package ‘MODIS’ was built under R version 3.4.2 
2: package ‘mapdata’ was built under R version 3.4.2 
3: package ‘maps’ was built under R version 3.4.2 
> MODISoptions(localArcPath = "c:/MODIS/temp",
+              outDirPath = "c:/temp/MODIS/processed",
+              MODISserverOrder = c("LAADS", "LPDAAC"),
+              gdalPath = "C:/OSGeo4W64/bin/")
  'MRT_HOME' not set/found! MRT is NOT enabled! See: 'https://lpdaac.usgs.gov/tools/modis_reprojection_tool'
Detecting available write drivers!
Found: 61 candidate drivers, detecting file extensions...
44 usable drivers detected!

STORAGE:
_______________
localArcPath : c:/MODIS/temp/ 
outDirPath   : c:/Temp/MODIS/processed/ 


DOWNLOAD:
_______________
MODISserverOrder : LAADS, LPDAAC 
dlmethod         : auto 
stubbornness     : high 
wait             : 0.5 
quiet            : FALSE 


PROCESSING:
_______________
GDAL           : GDAL 1.11.2, released 2015/02/10 
MRT            : Not available. Use 'MODIS:::checkTools('MRT')' for more information! 
pixelSize      : asIn 
outProj        : asIn 
resamplingType : NN 
dataFormat     : GTiff 


> cll <- getCollection(product = "MOD15A2H", forceCheck = TRUE)
Updating collections from LPDAAC for platform: Terra 
> tfs <- runGdal(product = "MOD15A2H", collection = cll,
+                tileH = 11, tileV = 4, 
+                begin = "2017001", end = "2017100", 
+                SDSstring = "101100",
+                outProj="EPSG:32615")
########################
outProj          =  +init=epsg:32615 +proj=utm +zone=15 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0 
pixelSize        =  asIn 
resamplingType   =  near 
Error in rgdal::rawTransform(projfrom, projto, nrow(xy), xy[, 1], xy[,  : 
  no arguments in initialization list

issue #28 on the package's GitHub repository. This bug has been fixed as of MODIS-1.1.2:

# install.packages("MODIS")
library(MODIS)

# set MODISoptions()
# ...

tfs <- runGdal(product = "MOD15A2H",
               tileH = 11, tileV = 4, outProj = "EPSG:32615", 
               begin = "2017001", end = "2017010", 
               SDSstring = "101100", job = "mod15a2h.006")
tfs
$MOD15A2H.006
$MOD15A2H.006$`2017-01-01`
[1] ".../MODIS_~1/PROCES~1/mod15a2h.006/MOD15A2H.A2017001.Fpar_500m.tif"   
[2] ".../MODIS_~1/PROCES~1/mod15a2h.006/MOD15A2H.A2017001.FparLai_QC.tif"  
[3] ".../MODIS_~1/PROCES~1/mod15a2h.006/MOD15A2H.A2017001.FparExtra_QC.tif"

$MOD15A2H.006$`2017-01-09`
[1] ".../MODIS_~1/PROCES~1/mod15a2h.006/MOD15A2H.A2017009.Fpar_500m.tif"   
[2] ".../MODIS_~1/PROCES~1/mod15a2h.006/MOD15A2H.A2017009.FparLai_QC.tif"  
[3] ".../MODIS_~1/PROCES~1/mod15a2h.006/MOD15A2H.A2017009.FparExtra_QC.tif"