Get and set CRS object or WKT string properties.
fm_wkt_is_geocent(wkt)fm_crs_is_geocent(crs)
fm_wkt_get_ellipsoid_radius(wkt)
fm_crs_get_ellipsoid_radius(crs)
fm_ellipsoid_radius(x)
# S3 method for default
fm_ellipsoid_radius(x)
# S3 method for character
fm_ellipsoid_radius(x)
fm_wkt_set_ellipsoid_radius(wkt, radius)
fm_ellipsoid_radius(x) <- value
# S3 method for character
fm_ellipsoid_radius(x) <- value
# S3 method for CRS
fm_ellipsoid_radius(x) <- value
# S3 method for inla.CRS
fm_ellipsoid_radius(x) <- value
# S3 method for crs
fm_ellipsoid_radius(x) <- value
# S3 method for fm_crs
fm_ellipsoid_radius(x) <- value
fm_crs_set_ellipsoid_radius(crs, radius)
fm_wkt_unit_params()
fm_wkt_get_lengthunit(wkt)
fm_wkt_set_lengthunit(wkt, unit, params = NULL)
fm_crs_get_lengthunit(crs)
fm_crs_set_lengthunit(crs, unit)
fm_length_unit(x)
# S3 method for default
fm_length_unit(x)
# S3 method for character
fm_length_unit(x)
fm_length_unit(x) <- value
# S3 method for character
fm_length_unit(x) <- value
# S3 method for CRS
fm_length_unit(x) <- value
# S3 method for inla.CRS
fm_length_unit(x) <- value
# S3 method for crs
fm_length_unit(x) <- value
# S3 method for fm_crs
fm_length_unit(x) <- value
fm_wkt(crs)
fm_proj4string(crs)
fm_crs_get_wkt(crs)
For fm_wkt_unit_params
, a
list of named unit definitions
For fm_wkt_get_lengthunit
, a
list of length units used in the wkt string, excluding the ellipsoid radius
unit.
For fm_wkt_set_lengthunit
, a
WKT2 string with altered length units.
Note that the length unit for the ellipsoid radius is unchanged.
For fm_crs_get_lengthunit
, a
list of length units used in the wkt string, excluding the ellipsoid radius
unit. (For legacy PROJ4 code, the raw units from the proj4string are
returned, if present.)
For fm_length_unit<-
, a crs object with
altered length units.
Note that the length unit for the ellipsoid radius is unchanged.
A WKT2 character string
An sf::crs
, sp::CRS
, fm_crs
or inla.CRS
object
crs object to extract value from or assign values in
numeric; The new radius value
Value to assign
character, name of a unit. Supported names are
"metre", "kilometre", and the aliases "meter", "m", International metre",
"kilometer", and "km", as defined by fm_wkt_unit_params
or the
params
argument. (For legacy PROJ4 use, only "m" and "km" are
supported)
Length unit definitions, in the list format produced by
fm_wkt_unit_params()
, Default: NULL, which invokes
fm_wkt_unit_params()
Finn Lindgren finn.lindgren@gmail.com
fm_crs()
if (FALSE) {
c1 <- fm_crs("globe")
fm_crs_get_lengthunit(c1)
c2 <- fm_crs_set_lengthunit(c1, "m")
fm_crs_get_lengthunit(c2)
}
Run the code above in your browser using DataLab