I have created SpatialPixelsDataFrame objects from Raster files. But I cannot work it along with my SpatialPintsDataFrame object. I got this error message: Error in count.points(GPSLocs, Grass) : different proj4string in w and xy which means the SpatialPixelsDataFrame objects do not have a projection defined.
GPSLocs= SpatialPointsDataFrame object Grass= SpatialPixelsDataFrame object
Any suggestions of how to fix this issue?
The message "different proj4string in w and xy" suggest that the coordinate reference systems are different (it may be that one of them is undefined). For others to be able to help you, should always show some code or data. For example what you get when you do:
library(raster)
w
xy
# or
crs(w)
crs(xy)