Closed ghost closed 3 years ago
This is an issue with the PROJ4/PROJ6 transition in rgdal and sp; the apparent "NA" is just the proj4string being NA, but it has valid WKT information that is what is actually used (see cat(sp::wkt(INLA::inla.CRS("globe")))
). Unfortunately, a bug was introduced in a recent rgdal version where it relied on sp::is.projected()
which hadn't been updated to handle this kind of CRS object. This has now been fixed in Roger Bivand's sp repository; try installing it with
remotes::install_github("https://github.com/rsbivand/sp/tree/master")
I don't know when that will make it onto CRAN; I assume in the next update of rgdal and sp.
lambert_globe is a flat projection, and globe is the actual globe, so that replacement doesn't work.
The problem was introduced sometime between rgdal 1.5-12 and 1.5-16, with sp 1.4-2.
Perfect cheers, updating to remotes::install_github("https://github.com/rsbivand/sp/tree/master") has worked.
I believe this has been fixed with the latest sp release, 1.4-4.
Have been tiding up some old bits of code and found that the ipoints() function is not working as before for SpatialLines.
Traced the problem into the int.slines() function within ipoints(), where INLA::inla.CRS("globe") is called.
inla.CRS("globe") is returning "NA", which seems to lead to the error message "Error in if (is.projected(obj)) { : missing value where TRUE/FALSE needed".
Replacing INLA::inla.CRS("globe") with INLA::inla.CRS("lambert_globe") lets the function proceed. However do the following lines also need to be changed in this case?
Package versions: INLA_20.08.04
inlabru_2.1.13.999
Cheers,
H