Surface Maps
On Wed, 25 Oct 2006, Arien Lam wrote:
bertrand toupin wrote:
Hi everyone, I'm trying to do a surface map like this one : http://img63.imageshack.us/my.php?image=terreeu4.jpg
That looks like a plot of gridded data that you could produce with spplot() in package sp.
Of course, my domain is smaller :) My entry are like that (polar stereographic grid from a numerical model): lat long Data 40 -77.0 24.0 42 -77.2 23.0 41 -76.0 22.5
This doesn't look like a grid, and it also doesn't look like projected, but it does look like spatial points in latlon and you can plot them with spplot(). If these spatial points are gridcell centers, you can define their representative area as a grid or as polygons (given the parameters of the projection and the numerical model) and you can plot those with spplot(), or you can interpolate these point data to a regular grid and then plot the grid (with spplot()).
Typical advice is to interpolate using splines, for example interp() in the akima package, Tps in the fields package, or you may like to try out this new package: The new Multilevel B-spline Approximation (MBA) R package fits B-spline surfaces to bivariate scattered data. The mba.surf function is similar to Akima's interp function, but provides improved surface fit characteristics, efficiency for large datasets, and extended functionality. Additional package information is available on CRAN and http://blue.fr.umn.edu/MBA just on CRAN from Andrew Finley. Of course, interpolation is about creating data where you don't have any, so no single solution is best for all data sets. If you want to display the output using spplot, you'll need to get the output into at least a SpatialPixelsDataFrame object. Roger
Hope this helps, Arien
So, i have about 58 pts on a 2? x 1? window in the North-Eastern US and the entry are unsorted and it's not a regular grid when I plot my points on a map.
I tried help.search("surface map"), but I found nothing. It's probably in a package i still don't have.
Thanks for any help again!
---------------------------------
---------------------------------
Get a sneak peak at messages with a handy reading pane.
[[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
Roger Bivand Economic Geography Section, Department of Economics, Norwegian School of Economics and Business Administration, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43 e-mail: Roger.Bivand at nhh.no