View source: R/kernelscalingedetails.R
kernelscalingdetails | R Documentation |
This is used internally in kernelsmooth
and gaussiansmooth
to determine the upscaling factor, realized tilesize, and buffer.
It is provided to users as it is necessary to anticipate the realized tilesize correctly to use the tiles arguments to the character methods of the smoothing functions (in gridio).
kernelscalingdetails(max.r, cellsize, tilesize = 2000, kernel.dim = 21, method = 3)
max.r |
radius of the kernel in the units of the projection (mapunits)
it should be set to the same value as in the call to the smoothing function ( |
cellsize |
cellsize of the grid being smoothed |
tilesize |
the target tilesize as specified in calls to the smoothing functions. |
kernel.dim |
the target kernel dimension (in the coarse grid) as specified in the calls to the smoothing funcitons. |
method |
The method used when calling gaussiansmooth.character (in gridio) in all other cases just leave at the default. |
If you want to run on a subset of tiles and are using gaussiansmooth.character or kernelsmooth.character in the gridio package then use this function to precalculate the tilesize so you can figure out which tiles to run on. The tilesize will depend on the target tilesize, the cellsize, and max.r. Which in practice means you'll have a different tilesize for each kernel bandwidth.
factor |
The factor used when changing the resolution of a grid. This is the ratio of the dimension of a coarse grid cell to that of a fine grid cell. Eg with 30 metercells and factor of 4 the coarse representation will have 120 m cells |
tilesize |
This is the realized tilesize used by the smoothing functions (when reading from disk in tiles). Since the realized tilesize is a multiple of the factor the user requested tilesize can't usually be met and instead the closes possible multiple of factor is used. |
Ethan Plunkett
gaussiansmooth
,kernelsmooth
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.