[R-sig-Geo] rainfall interpolation using ANN

Frede Aakmann Tøgersen frtog at vestas.com
Wed Dec 3 07:20:15 CET 2014


Hi Nahm

I suppose that by ‘ANN’ you mean artificial neural network.

If you do google for “ann interpolation” you’ll get many hits.

Here is one comparing kriging, idw and ann interpolation (in this case kriging seems to be superior in terms of root mean squared error, RMSE):

http://omicsgroup.org/journals/testing-artificial-neural-network-ann-for-spatial-interpolation-2329-6755.1000145.pdf 

Another one is:

https://www.researchgate.net/publication/260496994_Testing_Artificial_Neural_Network_%28ANN%29_for_Spatial_Interpolation

which may lead you to:

https://www.researchgate.net/publication/225544039_A_new_approach_for_deriving_temperature_and_salinity_fields_in_the_Indian_Ocean_using_artificial_neural_networks 

Hope that helps.

Yours sincerely / Med venlig hilsen


Frede Aakmann Tøgersen
Specialist, M.Sc., Ph.D.
Plant Performance & Modeling

Technology & Service Solutions
T +45 9730 5135
M +45 2547 6050
frtog at vestas.com
http://www.vestas.com

Company reg. name: Vestas Wind Systems A/S
This e-mail is subject to our e-mail disclaimer statement.
Please refer to www.vestas.com/legal/notice
If you have received this e-mail in error please contact the sender. 

From: R-sig-Geo [mailto:r-sig-geo-bounces at r-project.org] On Behalf Of Nahm Lee
Sent: 1. december 2014 19:32
To: Mengxi Yang; r-sig-geo at r-project.org
Subject: Re: [R-sig-Geo] rainfall interpolation using ANN

This is my example with idw based on a web site, # http://www.geo.ut.ee/aasa/LOOM02331/R_idw_interpolation.html.

Nahm Lee
nlee at valleywater.org



# http://www.geo.ut.ee/aasa/LOOM02331/R_idw_interpolation.html

library(ggplot2)
library(gstat)
library(sp)
library(maptools)
library(rgeos)

setwd("C:/Users/Michael/Dropbox/R/SHP")

AlertRain <- read.csv(file = "AlertRain.csv",header = TRUE)

names(AlertRain)

AlertRain_test <- AlertRain   # duplicate air temp. data file
AlertRain$x <- AlertRain$longitude  # define x & y as longitude and latitude
AlertRain$y <- AlertRain$latitude

# Set spatial coordinates to create a Spatial object:
coordinates(AlertRain_test) = ~x + y

plot(AlertRain_test)

# Define the grid extent:
#x.range <- as.numeric(c(21.76, 28.21))  # min/max longitude of the interpolation area
#y.range <- as.numeric(c(57.45, 59.72))  # min/max latitude of the interpolation area

x.range <- c(min(round(AlertRain_test$x,2)-0.1),max(round(AlertRain_test$x,2)+0.1))
y.range <- c(min(round(AlertRain_test$y,2)-0.1),max(round(AlertRain_test$y,2)+0.1))

# Create a data frame from all combinations of the supplied vectors or factors. 
# See the description of the return value for precise details of the way this is done. 
# Set spatial coordinates to create a Spatial object. Assign gridded structure:
grd <- expand.grid(x = seq(from = x.range[1], to = x.range[2], by = 0.1), y = seq(from = y.range[1], 
    to = y.range[2], by = 0.1))  # expand points to grid
coordinates(grd) <- ~x + y
gridded(grd) <- TRUE

#Plot the weather station locations and interpolation grid:
plot(grd, cex = 1.5, col = "grey")
points(AlertRain_test, pch = 1, col = "red", cex = 1)

# interpolate surface and fix the output:

idw <- idw(formula = Elevation ~ 1, locations = AlertRain_test, 
    newdata = grd)  # apply idw model for the data
## [inverse distance weighted interpolation]

idw.output = as.data.frame(idw)  # output is defined as a data table
names(idw.output)[1:3] <- c("long", "lat", "var1.pred")  # give names to the modelled variables

#Plot the results:

ggplot() + geom_tile(data = idw.output, aes(x = long, y = lat, fill = var1.pred)) + scale_fill_gradient(low = "cyan", high = "orange")+
    geom_point(data = AlertRain, aes(x = longitude, y = latitude), shape = 21, 
        colour = "red")+labs(title = "Elevation by rainfall station elevation")



From: R-sig-Geo [mailto:r-sig-geo-bounces at r-project.org] On Behalf Of Mengxi Yang
Sent: Monday, December 01, 2014 1:32 AM
To: r-sig-geo at r-project.org
Subject: [R-sig-Geo] rainfall interpolation using ANN

Dear list,
I am going to do daily rainfall interpolation using ANN. but I am not familiar with it. Can somebody give some advise or example?

my data like:
 I have 325 stations in different location.each station have unique code and coordinates. And I want to interpolate in 1km resolution. I have the mask map of NL.


can someone give me some advice? because I want to compare ANN with Kriging and IDW.
Thank you very much.

Mengxi Yang


More information about the R-sig-Geo mailing list