[R-sig-Geo] Fast calculation of block-block covariance

Christoph Hofer christoph.hofer at env.ethz.ch
Tue May 16 10:35:43 CEST 2006


Dear all

I'm a Ph.D. student in Environmental Sciences at the ETH Zurich and   
new to this list, but I have searched for an answer to my problem in  
the list archives and couldn't find anything.

I have the following problem:
I want to calculate the block-block covariance C(B1,B2) among two  
blocks  of arbitrary  shaped polygons (non-rectangular). In the gstat  
package the block-block covariance is calculated by discretizing the  
blocks by points (via the command  "nblockdiscr" one can choose the  
number of points in the polygon).
I wrote R code with the function integrate, but to calculate the  
block-block covariance a quad integral of the covariance function has  
to be calculated and  therefore even for polygons with a few vertices  
my code is  very slow.

Is there a fast solution (algorithm, package or function in R, aside  
from the gstat solution) to calculate the block-block covariance of  
arbitrary shaped polygons?

Best regards

Christoph Hofer




More information about the R-sig-Geo mailing list