These functions still attempt to do their job, but will be removed in a future version.
fm_spTransform(x, ...)# S3 method for default
fm_spTransform(x, crs0 = NULL, crs1 = NULL, passthrough = FALSE, ...)
# S3 method for SpatialPoints
fm_spTransform(x, CRSobj, passthrough = FALSE, ...)
# S3 method for SpatialPointsDataFrame
fm_spTransform(x, CRSobj, passthrough = FALSE, ...)
fm_has_PROJ6()
fm_as_sp_crs(x, ...)
fm_sp_get_crs(x)
fm_sp2segment(...)
A CRS object, or NULL if no valid CRS identified
A sp::Spatial object
Potential additional arguments
The source sp::CRS or inla.CRS object
The target sp::CRS or inla.CRS object
Default is FALSE. Setting to TRUE allows objects with no CRS information to be passed through without transformation.
The target sp::CRS or inla.CRS object
fm_spTransform(): (See
fm_transform() instead)
Handle transformation of various inla objects according to coordinate
reference systems of sp::CRS or INLA::inla.CRS class.
fm_spTransform(default): The default method handles low level
transformation of raw coordinates.
fm_has_PROJ6(): Old checker for PROJ6.
fm_as_sp_crs(): Wrapper for fm_CRS()
sp::Spatial and sp::CRS objects.
fm_sp_get_crs(): Wrapper for CRS(projargs) (PROJ4) and
CRS(wkt) for sp::Spatial objects.
Finn Lindgren finn.lindgren@gmail.com
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.
fm_transform()
if (fm_safe_sp()) {
s <- sp::SpatialPoints(matrix(1:6, 3, 2), proj4string = fm_CRS("sphere"))
fm_CRS(s)
}
Run the code above in your browser using DataLab