Dear GIS people What is the best way of implemeting spatial data interpolation (from large to small grids)-especially for dummies. I searched the internet and could not get concrete answer. Here is an example with simulated data. #Example of spatial data interpolation require(utils) #I need to interpolate the temp and rain data (from its surounding points) #for the same period and accoubting for elevation #New coordinates and elevation lat <-seq(-1, -5, by=-0.1) lon <-seq(28, 30, by=0.1) year <- seq(2000, 2005, by=1) period <- c("Mar", "Apr","May") ndata <- list(year=year,period=period,lat=lat, lon=lon) ndata <- expand.grid(ndata) ndata$elev <-sample(1000: 8000,nrow(ndata),replace=T) ndata <- ndata[order(ndata$year,ndata$period) , ] fix(ndata) #Original data with elevation-same period lat <- seq(-1, -5, by=-0.5) lon <- seq(28, 30, by=0.5) data <- list(year=year,period=period,lat=lat, lon=lon) data <- expand.grid(data) data$temp <- sample(15:100, nrow(data),replace=T) data$rain <- sample(0: 1000,nrow(data),replace=T) data <- data[order(data$year,data$period) , ] data <- na.omit(merge(data,ndata, by=c("year", "period", "lat","lon"))) fix(data) ########## #Spatial-Temporal Interpolation from original data (temp & rain) to new data
Peter Maclean Department of Economics UDSM ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.