Deprecated functions in fmesher
Source:R/deprecated.R
, R/crs.R
, R/mesh.R
, and 1 more
fmesher-deprecated.Rd
These functions still attempt to do their job, but will be removed in a future version.
Usage
fm_spTransform(x, ...)
# Default S3 method
fm_spTransform(x, crs0 = NULL, crs1 = NULL, passthrough = FALSE, ...)
# S3 method for class 'SpatialPoints'
fm_spTransform(x, CRSobj, passthrough = FALSE, ...)
# S3 method for class 'SpatialPointsDataFrame'
fm_spTransform(x, CRSobj, passthrough = FALSE, ...)
# S3 method for class 'inla.mesh.lattice'
fm_spTransform(x, CRSobj, passthrough = FALSE, ...)
# S3 method for class 'inla.mesh.segment'
fm_spTransform(x, CRSobj, passthrough = FALSE, ...)
# S3 method for class 'inla.mesh'
fm_spTransform(x, CRSobj, passthrough = FALSE, ...)
fm_has_PROJ6()
fm_not_for_PROJ6(fun = NULL)
fm_not_for_PROJ4(fun = NULL)
fm_fallback_PROJ6(fun = NULL)
fm_requires_PROJ6(fun = NULL)
fm_as_sp_crs(x, ...)
fm_sp_get_crs(x)
fm_as_inla_mesh_segment(...)
fm_as_inla_mesh(...)
fm_sp2segment(...)
Arguments
- x
A
sp::Spatial
object- ...
Potential additional arguments
- crs0
The source sp::CRS or inla.CRS object
- crs1
The target sp::CRS or inla.CRS object
- passthrough
Default is FALSE. Setting to TRUE allows objects with no CRS information to be passed through without transformation.
- CRSobj
The target sp::CRS or inla.CRS object
- fun
The name of the function that requires PROJ6. Default: NULL, which uses the name of the calling function.
Details
This function is a convenience method to workaround PROJ4/PROJ6
differences, and the lack of a crs extraction method for Spatial objects.
For newer code, use fm_crs()
instead, that returns crs
objects, and use
fm_CRS() to extract/construct/convert to old style sp::CRS
objects.
Functions
fm_spTransform()
: (Seefm_transform()
instead) Handle transformation of various inla objects according to coordinate reference systems ofsp::CRS
orINLA::inla.CRS
class.fm_spTransform(default)
: The default method handles low level transformation of raw coordinates.fm_has_PROJ6()
: Detect whether PROJ6 is availablefm_not_for_PROJ6()
:fm_not_for_PROJ6
is called to warn about using old PROJ4 features even though PROJ6 is availablefm_not_for_PROJ4()
:fm_not_for_PROJ4
is called to give an error when calling methods that are only available for PROJ6fm_fallback_PROJ6()
: Called to warn about falling back to using old PROJ4 methods when a PROJ6 method hasn't been implementedfm_requires_PROJ6()
: Called to give an error when PROJ6 is required but not availablefm_as_sp_crs()
: Wrapper forfm_CRS()
sp::Spatial
andsp::CRS
objects.fm_sp_get_crs()
: Wrapper forCRS(projargs)
(PROJ4) andCRS(wkt)
forsp::Spatial
objects.fm_as_inla_mesh_segment()
: Conversion to inla.mesh.segment in favour offm_as_segm()
.fm_as_inla_mesh()
: Conversion to inla.mesh. in favour offm_as_mesh_2d()
.fm_sp2segment()
: in favour offm_as_segm()
Author
Finn Lindgren finn.lindgren@gmail.com
Examples
if (fm_safe_sp()) {
s <- sp::SpatialPoints(matrix(1:6, 3, 2), proj4string = fm_CRS("sphere"))
fm_CRS(s)
}
#> Coordinate Reference System:
#> Deprecated Proj.4 representation: +proj=geocent +R=1 +units=m +no_defs
#> WKT2 2019 representation:
#> GEODCRS["unknown",
#> DATUM["unknown",
#> ELLIPSOID["unknown",1,0,
#> LENGTHUNIT["metre",1,
#> ID["EPSG",9001]]]],
#> PRIMEM["Reference meridian",0,
#> ANGLEUNIT["degree",0.0174532925199433,
#> ID["EPSG",9122]]],
#> CS[Cartesian,3],
#> AXIS["(X)",geocentricX,
#> ORDER[1],
#> LENGTHUNIT["metre",1,
#> ID["EPSG",9001]]],
#> AXIS["(Y)",geocentricY,
#> ORDER[2],
#> LENGTHUNIT["metre",1,
#> ID["EPSG",9001]]],
#> AXIS["(Z)",geocentricZ,
#> ORDER[3],
#> LENGTHUNIT["metre",1,
#> ID["EPSG",9001]]]]