inla.sp_get_crs.RdWrapper for CRS(projargs) (PROJ4) and CRS(wkt) for
sp::Spatial objects.
inla.sp_get_crs(x)A sp::Spatial object
A CRS object, or NULL if no valid CRS identified
This function is a convenience method to workaround PROJ4/PROJ6 differences, and the lack of a crs extraction method for Spatial objects.
if (FALSE) { # \dontrun{
if(interactive()){
s <- sp::SpatialPoints(matrix(1:6, 3, 2), proj4string = inla.CRS("sphere"))
inla.sp_get_crs(s)
}
} # }