Closed nagyrc closed 5 years ago
@nagyrc I can't reproduce this locally, since I do not have the MODIS data used in the script.
Instead of reprojecting the MODIS data, it would be more efficient to reproject the points. In psuedocode:
1. Project points to the raster's projection
2. Use raster::extract to get the values, and return a SpatialPointsDataFrame
No need to reproject or crop the raster if you reproject the points.
@nagyrc I'm not sure whether you saw my previous replies - this is just a ping to bump it into your inbox!
Awesome, thanks! I'll give this a try!
I reprojected the points to match the raster then used raster::extract. This was much faster.
https://github.com/nagyrc/C_fire_invasives/blob/59d2212953481cac6957b955e151f42d454337ae/4_add_fire_data.R#L187-L194