2017-10-11 1 views
0

Ich versuche, das MODIS-Paket zu verwenden, um ein Produkt (MOD15A2H) herunterzuladen, aber während des Befehls runGdal eine 'error in rgdal::rawTransform' erhalten.Herunterladen von MODIS-Daten mit MODIS-Paket

Hat jemand irgendwelche Ideen?

Hier ist mein Skript ...

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") 

Und hier sind die Meldungen in der Konsole ...

> 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 

Antwort

0

Siehe issue #28 auf dem GitHub-Repository Paket. Dieser Fehler wurde ab MODIS-1.1.2 behoben:

# 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"