I have a spatial point DF spo (covering an irregularly shaped area). Data is not on a regular grid due to crs conversion.
My goal is a bitmap with a predetermined resolution and the length of the region of interest (more spatial point data should be displayed on this main raster).
Problems begin when I
rasterize(spo, raster(ncol, nrow, extent, crs), spo$param)
I need to configure nrow and ncol so that I don't get NA moire patterns within my area of interest. I cannot use the predefined (higher) resolution, since rasterize does not have interpolation capabilities.
As a solution to this, I thought that I might need some kind of spatial pixel DF spi , which covers my entire area of interest (like meuse.grid in library(raster); data(meuse.grid) ) and serves as the main grid. Then I can use it to interpolate my data, for example.
idw(param~1,spo,spi)
and thereby get full coverage of my area of interest in my chosen resolution. But how to create a SpatialPixelsDataFrame from point data?
So, in my opinion, the question boils down to the following: How to create meuse.grid from the meuse dataset?
Maybe I am using the wrong approach here, so please let me know if it is easier to achieve what I need using a different method.
source share