Handling CRS/WKT
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_wkt_set_ellipsoid_radius(wkt, radius) 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_wkt(crs) fm_crs_get_lengthunit(crs) fm_crs_set_lengthunit(crs, unit, params = NULL)
wkt |
A WKT2 character string |
crs |
A |
radius |
numeric; The new radius value |
unit |
character, name of a unit. Supported names are
"metre", "kilometre", and the aliases "meter", "m", International metre",
"kilometer", and "km", as defined by |
params |
Length unit definitions, in the list format produced by
|
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_wkt
, WKT2 string.
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_crs_set_lengthunit
, a sp::CRS
object with
altered length units.
Note that the length unit for the ellipsoid radius is unchanged.
Finn Lindgren finn.lindgren@gmail.com
## Not run: if (fm_has_PROJ6()) { c1 <- fm_CRS("globe") fm_crs_get_lengthunit(c1) c2 <- fm_crs_set_lengthunit(c1, "km") fm_crs_get_lengthunit(c2) } ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.