Skip to content
Prev 2680 / 29559 Next

SpatialPixel and SpatialPoints Overlay output

Hello R User's,

I am struggling with overlaying 2 rasters datasets. Both were ASCII grids 
and loaded via read.asciigrid. One as SpatialPixelDataFrame and another 
converted to SpatialPointsDataFrame.

The are shifted with respect to each other and the aim is to get the values 
from raster1 in the overaly region with raster2. However, the overaly does 
not give the values which are in raster1 at data, but the values' 
order(position in the vector).

Could anyone advise why is that? Is there a simple way how to actually clip 
them according to the overlay region?

Thank you very much.

Regards,

Michal