只是更新下面的建議;我注意到MARMAP v0.9.2現在已經在服務器位置的這種變化中得到糾正,並且工作正常。
諾阿的約翰回覆了我。 getNOAA.bathy中使用的URL在前一段時間已經停用。他建議我將以下修改的URL替換成功能成功;
http://maps.ngdc.noaa.gov/mapviewer-support/wcs-proxy/wcs.groovy?filename=etopo1.xyz&request=getcoverage&version=1.0.0&service=wcs&coverage=etopo1&CRS=EPSG:4326&format=xyz&resx=0.016666666666666667&resy=0.016666666666666667&bbox=-90.08789062497661,22.248428704378167,-79.07958984372954,31.877557643332576
getNOAA.bathy2<-
function (lon1, lon2, lat1, lat2, resolution = 4, keep = FALSE)
{
x1 = x2 = y1 = y2 = NULL
if (lon1 < lon2) {
x1 <- lon1
x2 <- lon2
}
else {
x2 <- lon1
x1 <- lon2
}
if (lat1 < lat2) {
y1 <- lat1
y2 <- lat2
}
else {
y2 <- lat1
y1 <- lat2
}
res = resolution * 0.0166666666666667
FILE <- paste("marmap_coord_", x1, ":", y1, ":", x2, ":",
y2, "_res_", resolution, ".csv", sep = "")
if (FILE %in% list.files()) {
cat("File already exists ; loading '", FILE, "'", sep = "")
exisiting.bathy <- read.bathy(FILE, header = T)
return(exisiting.bathy)
}
else {
WEB.REQUEST <- paste("http://maps.ngdc.noaa.gov/mapviewer-support/wcs-proxy/wcs.groovy?filename=etopo1.xyz&request=getcoverage&version=1.0.0&service=wcs&coverage=etopo1&CRS=EPSG:4326&format=xyz&resx=0.016666666666666667&resy=0.016666666666666667&bbox=-90.08789062497661,22.248428704378167,-79.07958984372954,31.877557643332576",
res, "&resy=", res, "&bbox=", x1, ",", y1, ",", x2,
",", y2, sep = "")
cat("Querying NOAA database ...\n")
cat("This may take seconds to minutes, depending on grid size\n")
bath <- read.table(WEB.REQUEST)
cat("Building bathy matrix ...\n")
bath2 <- as.bathy(bath)
if (keep == TRUE) {
write.table(bath, file = FILE, sep = ",", quote = FALSE,
row.names = FALSE)
}
return(bath2)
}
}
您是否嘗試過直接打開網址是什麼? – 2014-10-09 13:31:50
剛剛做過了,感謝Andrew的調試提示;由於維護停機或容量問題,服務器暫時無法處理您的請求。請稍後再試。 Apache/2.2.15(紅帽)服務器在mapserver.ngdc.noaa.gov港口80 – 2014-10-09 23:34:47