Raster resampling and reprojection
In this section, we are going to transfer the values of a given raster from its own grid to a different grid. This operation is known as resampling. Raster reprojection is a closely related operation; it is basically resampling to a grid having a different CRS than that of the original raster.
Raster resampling
Raster resampling can be performed using the resample
function. The required parameters of this function are as follows:
- The raster whose values are to be resampled (
x
) - A raster that defines the grid to which the values will be transferred (
y
) - The resampling method (
method
)
The resample
function currently provides two resampling methods. The method that we use determines the way in which a cell in the new raster ...
Get Learning R for Geospatial Analysis now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.