I am working exclusively on the terra
package.
spatRaster details: Carbon flux data of South America (~500 GB)
spatVector details: Protected Areas database of South America (~70 MB)
Goal: To compute zonal statistics
Error: While performing zonal statistics operation, the extents do not overlap.
Possible reason for error: Raster files have only the terrestrial extent. Polygons, however, extend up to marine regions, thus have terrestrial, marine, and terrestrial-marine combined extents.
Question: Is it possible to extend the raster file up to the extent of Polygon without losing any values for this much large file? Is there any efficient way to solve this kind of problem?
PS: I am new here, and if anyone finds out that the similar question is answered already, please help me out. I am sorry that I couldn’t make a reproducible example for this problem.