Skip to contents

Check if two CRS objects are identical

Usage

fm_identical_CRS(crs0, crs1, crsonly = FALSE)

Arguments

crs0, crs1

Two sf::crs, sp::CRS, fm_crs or inla.CRS objects to be compared.

crsonly

logical. If TRUE and any of crs0 and crs1 are fm_crs or inla.CRS objects, extract and compare only the sf::crs or sp::CRS aspects. Default: FALSE

See also

Examples


crs0 <- crs1 <- fm_crs("longlat_globe")
fm_crs_oblique(crs1) <- c(0, 90)
print(c(
  fm_identical_CRS(crs0, crs0),
  fm_identical_CRS(crs0, crs1),
  fm_identical_CRS(crs0, crs1, crsonly = TRUE)
))
#> [1]  TRUE FALSE  TRUE