我正在尝试使用error in rgdal::rawTransform
软件包下载产品(MOD15A2H),但在runGdal
命令期间收到了“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
以下是控制台中的消息......
{{1}}
答案 0 :(得分:0)
请参阅包的GitHub存储库中的issue #28。从MODIS-1.1.2开始修复此错误:
public Foo GetInfo(TestName testNames)
{
int testNameId = testNames.TestId;
Foo foo = new Foo();
Func<TestItem, dynamic> dynamicBuilder = r => new { r.TestItemId, r.TestItemName, r.TestItemDirectory };
Func<string, int, TestItem> filteringMethod = (name, nameId) => testNames.TestItems.Where(ex => ex.TestNamesId == nameId && ex.TestItemName == name).Select(dynamicBuilder).FirstOrDefault();
Func<TestItem, string> formatMethod = record => $"{record.TestItemId},{record.TestItemName},{record.TestItemDirectory}";
switch (testNameId)
{
case 3:
foo.PassChoiseInfo = formatMethod(filteringMethod("Pass", 3));
foo.FailChoiceInfo = formatMethod(filteringMethod("Fail", 3));
foo.NAChoiceInfo = formatMethod(filteringMethod("N/A", 3));
break;
case 4:
break;
case 5:
break;
case 7:
break;
//6 more cases
}
return foo;
}