Skip to content
Prev 26889 / 29559 Next

Create Kernel image results in *tif format

Dear Alexandre,

Indeed the solution by Florian below is very nice. If you really want to 
go the other direction you can use `as.SpatialGridDataFrame.im()` from 
the `maptools` package.

By the way, based on what you write, I think you mean to use the value 
7.5 (=0.75m) rather than 0.75 (=0.075 m) for your kernel bandwidth. 
Furthermore, the argument to set the standard deviation of the 
(isotropic Gaussian) smoothing kernel in `density.ppp()` is `sigma`, so 
you probably want:
     d_pines <- density(swedishpines, sigma = 7.5)

If you like to work in meters rather than decimeters you can rescale the 
point pattern:
     pines <- rescale(swedishpines, s = 10, unitname = "m")
     d_pines <- density(pines, sigma = 0.75)

Regards,
Ege
On 09/27/2018 10:01 AM, Florian Betz wrote: