Description Usage Arguments Details Value See Also Examples
View source: R/modify.operators.R
Rescaling a raster changes the raster's resolution.
1 |
obj |
[ |
factor |
[ |
kernelFunction |
[ |
The factor is a value by which the number of cells in x and y
dimension will be multiplied. If the raster should be up-scaled
(factor > 1
), only integer values are allowed (will be truncated if
it is not an integer). If the raster should be down-scaled (factor <
1
) any inverse of an integer value (1/n) is allowed (denominator will be
rounded to the next integer, such as 1/2 or 1/5).
The kernelFunction
used here deviates from the other
(morpholological) kernels in that it is a function, which interpolates the
values of new cells. See kernelFunction
for an
in-depth description.
A RasterLayer
with a dimension that has been up or down-scaled
from obj
, where the new values have been determined by applying
kernelFunction
.
Other operators to modify a raster: rBlend
,
rReduce
, rSegregate
1 2 3 4 5 6 7 8 9 10 | input <- rtRasters$continuous
visualise(input)
visualise(rRescale(input, factor = 0.5))
# up-scaling can be useful for follow-up morphological operations
binarised <- rBinarise(input, thresh = 30)
visualise(rSkeletonise(binarised))
rescaled <- rRescale(binarised, factor = 2)
visualise(rSkeletonise(rescaled), new = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.