[R] smoothing bathymetry

From: Jens <currie.jens_at_gmail.com>
Date: Wed, 06 Apr 2011 11:01:07 -0700 (PDT)

Dear R Users,

Using the following R-script I created the first image

> require(akima)
> require(spatial)
> dep <- interp(long, lat, depth, xo=seq(1,990,10), yo=seq(1,990,10),
+ extrap=FALSE, ncp=0,duplicate = "mean", dupfun = NULL)


Where "long" are x-coordinates between 1 and 1000, "lat" are y-cordinates between 1 and 1000, and depth are depth values corresponding to the x and y coordinates. All data are in vector form.

I would like to extrapolate the data points beyond the data set, by setting extrap=TRUE, filling out the entire 1000x1000 grid. I attempted this using the following script, which generated the second image.

>dep <- interp(long, lat, depth, xo=seq(1,990,10), yo=seq(1,990,10),
+ linear=FALSE,extrap=TRUE, ncp=NULL,duplicate = "mean", dupfun = NULL)

However, as seen in the image, this results in a messy looking bathymetry, with erros. Any suggestions on what went wrong or other packages or functions I could try to would be greatly appreciated?

I played around with the krig.image function in the "fields" package, but didnt have much luck.


View this message in context: http://r.789695.n4.nabble.com/smoothing-bathymetry-tp3431391p3431391.html
Sent from the R help mailing list archive at Nabble.com.

R-help_at_r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Wed 06 Apr 2011 - 20:34:45 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 06 Apr 2011 - 20:40:28 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive