Skip to content
Prev 3699 / 29559 Next

Defining a grid for interpolations ?

FYI

I have just finishing preparing an R script that accompanies my paper in Computers in Geosciences on
finding the grid cell size for various applications.

The script and the data sets can be obtained from:

http://spatial-analyst.net/pixel.php 

This gives a step-by-step guide to estimate suitable grid cell sizes given an input data with its
inherent properties: scale, positional accuracy, inspection density, spatial correlation and
complexity of terrain. The bottom line is that there are objective ways to calculate a suitable cell
size (or at least a range of suitable cell sizes), and that the selection of grid cell size can be
automated. For example, using the akima package we can automate estimation of the grid:
extrap=T, linear=F)
But I would rather first fit a variogram and then select the cell size based on the number of point
pairs and given the effective range of spatial autocorrelation.


For more info see also:

Hengl T., 2006. Finding the right pixel size. Computers and Geosciences, 32(9): 1283-1298.
http://dx.doi.org/10.1016/j.cageo.2005.11.008 


Tom Hengl
http://spatial-analyst.net 



-----Original Message-----
From: r-sig-geo-bounces at stat.math.ethz.ch [mailto:r-sig-geo-bounces at stat.math.ethz.ch] On Behalf Of
Mauricio Zambrano
Sent: dinsdag 27 mei 2008 15:27
To: Edzer Pebesma; Paul Hiemstra
Cc: r-sig-geo at stat.math.ethz.ch
Subject: Re: [R-sig-Geo] Defining a grid for interpolations ?

Dear Paul and Edzer,

Thanks a lot for your answers.

Before reading the solution proposed by Paul, I had tried with:

# reading the boundary of the catchment
library(maptools)
catchment <- readShapePoly("only_catchment.shp")
catchment.grid <- spsample(catchment, cellsize=100, offset = c(0.5,
0.5)) # reading the boundary of the catchment

 and then I did an IDW interpolation with:

pp.idw <- krige(PP_DAILY_MEAN_MM~1, meteo, catchment.grid)

and it works.

However, after reading your solution, I realised that I didn't use the command:

gridded(catchment.grid)

but I got an interpolation anyway.

Where is performed the interpolation when I don't use a gridded grid (
gridded(catchment.grid) ) ?

Best regards

Mauricio

2008/5/26 Edzer Pebesma <edzer.pebesma at uni-muenster.de>: