Closed mcoghill closed 1 year ago
SpatRaster
are not serializable which mean that you can't send dummy_grid_terra
to the two workers. I implemented some workaround on key location in the code of lidR
but it seems I did not handle this case. It works with dummy_grid_raster
because RasterLayer
are serializable.
Fixed
So there are a lot of moving parts here and I'm not entirely sure if the
lidR
package is to blame for this bug that I'm seeing, so please let me know if I should post this issue elsewhere. Basically, I am trying to create a DEM that matches the resolution and extent of anotherSpatRaster
object from theterra
package. In my case, I am doing this using several tiles and would like to parallelize this process using thefuture
package. The following example uses the example data from this package to replicate:At first I suspected that the error I am seeing was due to the
dummy_grid_terra
object being loaded into memory, but even when I initialize it with NaN values and write it to disk the error still exists, so that wasn't it. It's strange to me because it works fine with the olderRasterLayer
object. Is this the desired effect? Is there a way to go about this without using theraster
package?Thanks for the help!