Closed pjbouchet closed 4 years ago
This error arises because a key feature of dsmextra
is to provide tools for visualising extrapolation wherever it occurs. As such, compute_extrapolation
returns results in both numerical and raster formats (see vignette for details). The raster
package expects cells in the supplied prediction.grid
object to be evenly spaced. If they are not, then dsmextra
will automatically generate a suitable raster as long as the resolution
argument is specified. Otherwise, it will throw the above error.
The solution to this is therefore to add, say, resolution = 15000
, to the function call (assuming 15000 is an appropriate cell spacing for your data). Note that this is expressed in the units of the coordinate system used.
Phil
Some users have reported the below error when using
compute_extrapolation
(which also affectscompute_nearby
andextrapolation_analysis
):Error in compute_extrapolation(segments = Input, covariate.names = cov_vec2, : Prediction grid cells are not regularly spaced. A target raster resolution must be specified.