The coordinate system information is incorrect. You can usually find the information in a .e00 file. Here's what it says:
spheroid = GRS80
central meridian/longitude of origin = -96.0
standard parallel 1 = 29.5
standard parallel 2 = 45.5
latitude of origin = 23.0
false easting/false northing = 0.0
so the PROJ.4 string should be:
+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23.0 +lon_0=-96.0 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
To change the CRS of your raster use the crs
command:
crs(r) <- '+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23.0 +lon_0=-96.0 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs'
Then continue re-projecting the coordinates of your sites into the CRS of the raster with the code you have written.
Getting NaNs ("NA") back is sometimes a sign that the input coordinates can't be unprojected/reprojected which in turn can mean that the coordinate system information is incorrect. I've seen those parameter values before, but they weren't assigned to the parameters that I expected.
Use rasterToPoints
- for example:
> r = raster(matrix(1:12,3,4))
> rasterToPoints(r)
x y layer
[1,] 0.125 0.8333333 1
[2,] 0.375 0.8333333 4
[3,] 0.625 0.8333333 7
[4,] 0.875 0.8333333 10
[5,] 0.125 0.5000000 2
[6,] 0.375 0.5000000 5
[7,] 0.625 0.5000000 8
[8,] 0.875 0.5000000 11
[9,] 0.125 0.1666667 3
[10,] 0.375 0.1666667 6
[11,] 0.625 0.1666667 9
[12,] 0.875 0.1666667 12
you'll end up with 86 million rows, although cells with NA aren't returned.
Best Answer