[R-sig-Geo] Obtaining 3d surface area using polygon layer and DEM grid

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Wed Apr 14 18:03:51 CEST 2010


On Wed, Apr 14, 2010 at 4:38 PM, Edzer Pebesma
<edzer.pebesma at uni-muenster.de> wrote:
> Barry, I wouldn't object integrating it in sp. Can it cope with missing
> values in the grid? Would you be willing to write a short help file with
> some reference to the algorithm used? (I found this one:
> http://www.jennessent.com/downloads/WSB_32_3_Jenness.pdf )

 Not sure what to do about missing values, but that would be the way
to deal with non-rectangular areas. An NA cell would obviously
contribute 0 to the total surface, but it also affects the calculation
of surface areas for the eight adjacent cells.

 Currently it's just C code called with .C, so dealing with NA is
inherently troublesome anyway! Maybe I can rewrite to use .Call, but
there's a cricket match on...

Barry


-- 
blog: http://geospaced.blogspot.com/
web: http://www.maths.lancs.ac.uk/~rowlings
web: http://www.rowlingson.com/
twitter: http://twitter.com/geospacedman
pics: http://www.flickr.com/photos/spacedman



More information about the R-sig-Geo mailing list