Methods of checking whether various kinds of CRS objects are NULL
or NA
.
Logically equivalent to either is.na(fm_crs(x))
or
is.na(fm_crs(x, oblique = NA))
, but with a short-cut pre-check for
is.null(x)
.
Usage
fm_crs_is_null(x, crsonly = FALSE)
# S3 method for class 'fm_crs'
is.na(x)
Arguments
- x
An object supported by
fm_crs(x)
- crsonly
For crs objects with extended functionality, such as
fm_crs()
objects withoblique
information,crsonly = TRUE
only checks the plain CRS part.
Functions
fm_crs_is_null()
: Check if an object is or hasNULL
orNA
CRS information. If notNULL
,is.na(fm_crs(x))
is returned. This allows the input to be e.g. a proj4string or epsg number, since the defaultfm_crs()
method passes its argument on tosf::st_crs()
.is.na(fm_crs)
: Check if afm_crs
hasNA
crs information andNA
obliqueness
Examples
fm_crs_is_null(NULL)
#> [1] TRUE
fm_crs_is_null(27700)
#> [1] FALSE
fm_crs_is_null(fm_crs())
#> [1] TRUE
fm_crs_is_null(fm_crs(27700))
#> [1] FALSE
fm_crs_is_null(fm_crs(oblique = c(1, 2, 3, 4)))
#> [1] FALSE
fm_crs_is_null(fm_crs(oblique = c(1, 2, 3, 4)), crsonly = TRUE)
#> [1] TRUE
fm_crs_is_null(fm_crs(27700, oblique = c(1, 2, 3, 4)))
#> [1] FALSE
fm_crs_is_null(fm_crs(27700, oblique = c(1, 2, 3, 4)), crsonly = TRUE)
#> [1] FALSE