DEMs
Hi Abe, Did you try using the ETOPO1? This (0.1 degree) DEM can be well loaded to R:
# list of maps:
map.list <- c("globedem", "chlo08", "dcoast")
# download the zipped maps one by one:
for(i in 1:length(map.list)) {
download.file(paste(URL, map.list[i], ".zip", sep=""),
+ destfile=paste(getwd(), "/", map.list[i], ".zip", sep=""))
unzip(zipfile=paste(map.list[i], ".zip", sep=""), exdir=getwd()) unlink(paste(map.list[i], ".zip", sep="")) }
# read maps to R:
worldmaps <- readGDAL(paste(map.list[i], ".asc", sep=""))
# fix the layer name:
names(worldmaps)[1] <- map.list[1]
for(i in map.list[-1]) {
worldmaps at data[map.list[i]] <- readGDAL(paste(map.list[i], ".asc",
sep=""))$band1
}
proj4string(meuse.grid) <- CRS("+proj=longlat +ellps=WGS84")
I do not think that it will be easy to generate kriging with any global dataset that is <5 km resolution. You could try using the kriging in SAGA (it can handle maps up to 2 GB in size; it is exp(2) times faster than R). Here is an example: http://spatial-analyst.net/wiki/index.php?title=Interpolation_of_ISRIC-WISE_international_soil_profile_data T. Hengl PS: Which variable are you interpolating?
Hello All, My questions are regarding the best way to obtain DEMs for the entire globe. I am trying to krige a dataset of global scope. The dataset has points at all latitude/longitude intersects and so there are 64,800 sample points. The problem that I am having is that the DEMs I have been using are too large (memory) to be used as R variables. I also have had trouble finding a way to download DEMs for the entire globe. 1. Given the size of my sample dataset: What is the maximum resolution of DEM that I should be using? Do I only need values at prediction points or will higher res yield higher accuracy? 2. Is there a way to programmatically access DEMs using GDAL or R in general? ie. internally or through integration with McIDAS, NetCDF, etc. 3. Do I need to break the DEMs and sample dataset into smaller tiles to avoid the memory issues? If so how do I do that in R / GDAL? Thanks, Abe [[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo