Hi Sebastien,
I had a quick look...
It should be solved very soon since the developer from this widely used package is usually very reactive and helpful.
- The code you show is based on old code, IsoriX no longer use the package sp, but terra, so it can be the reason that "it" does not work, but without seeing a full example it is difficult for me to see where the problem may be coming from.
Below is a simple example of how to create a LandMask using IsoriX.
I hope it will sort you out.
++
Alex
library("IsoriX")
## Creating a LandMask
worldlimit <- vect(ext(CountryBorders))
crs(worldlimit) <- crs(CountryBorders)
LandMask <- worldlimit - OceanMask
## Using a silly isoscape on land from the documentation ?isoscape
GNIPDataDEagg <- prepsources(data = GNIPDataDE)
GermanFit <- isofit(
data = GNIPDataDEagg,
mean_model_fix = list(elev = TRUE, lat_abs = TRUE)
)
GermanScape <- isoscape(raster = ElevRasterDE, isofit = GermanFit)
## Plot masking the lands
plot(GermanScape, mask = list(mask = LandMask))