Closed AMBarbosa closed 11 months ago
I am running in the same issues. My first guess is that this is based on ras_create()
, and more specifically the terra::vect()
function. Currently the function doesn't consider the name of the lon/lat col names.
ex <- terra::ext(terra::vect(x[, c(lon, lat)], geom=c(lon, lat))) + thinning_res * 2
Also, I think the new name of terra objects is lyr.1
and not layer
I think my PR #92 might fix all this, but please double check :)
The terra::vect()
function takes "lon" and "lat" as the default coordinate column names; but in CoordinateCleaner::cc_outl()
, the default values for lon
and lat
are "decimalLongitude" and "decimalLatitude" respectively, so they do need to be specified to terra::vect()
. @mhesselbarth's PR should fix it. I'm just a bit puzzled as to why the error doesn't occur with all datasets that have outliers.
I think the issue only occurs if a raster is used to detect outliers, which is not the case for all species? But I haven't looked into that too much.
With some datasets, I'm getting an error when using the outliers test. Here's an example where this happens: