【问题标题】:downloading MODIS data using MODIS package使用 MODIS 包下载 MODIS 数据
【发布时间】:2017-10-11 16:27:04
【问题描述】:

我正在尝试使用 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

【问题讨论】:

    标签: r https satellite


    【解决方案1】:

    请参阅包的 GitHub 存储库上的 issue #28。此错误已从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"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-06-05
      • 1970-01-01
      • 1970-01-01
      • 2014-09-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-05
      相关资源
      最近更新 更多