is.projected.Rd
Sets or retrieves projection attributes on classes extending SpatialData; set or retrieve option value for error or warning on exceedance of geographical coordinate range, set or retrieve option value for exceedance tolerance of geographical coordinate range. Note that only “+proj=longlat +ellps=WGS84” is accepted for geographical coordinates, which must be ordered (eastings, northings); the “+ellps=” definition must be given (or expanded internally from a given “+datum=” value) for recent versions of the PROJ library, and should be set to an appropriate value.
From release 6 of the PROJ library, when used in building rgdal with GDAL >= 3, the +datum=
key in the Proj.4 string CRS representation is deprecated, and the +towgs84=
and +nadgrids=
keys may be deprecated soon. For this reason, sp, rgdal and sf are starting to use WKT2 (2019) string representations. In sp, the "CRS"
object in itself remains unchanged, but the content of its "projargs"
slot may be degraded. To work around the degradation, a comment
is added around the "CRS"
object containing a WKT2 (2019) string when rgdal is available and built with PROJ >= 6 and GDAL >=3. The wkt()
accessor function returns the WKT2 (2019) string comment belonging to the "CRS"
object.
is.projected(obj) proj4string(obj) proj4string(obj) <- value wkt(obj) get_ll_warn() get_ll_TOL() get_ReplCRS_warn() set_ll_warn(value) set_ll_TOL(value) set_ReplCRS_warn(value)
obj | An object of class or extending Spatial-class |
---|---|
value | For |
is.projected
returns a logical that may be NA
;
proj4string
returns a character vector of length 1.
proj4 strings are operative through CRAN package rgdal. For strings defined as “longlat”, the minimum longitude should be -180, the maximum longitude 360, the minimum latitude -90, and the maximum latitude 90. Note that the proj4string
replacement method does not project spatial data - for this use spTransform
methods in the rgdal package.
#> Warning: Discarded datum OSGB_1936 in CRS definitionif (!is.null(comment(slot(o, "proj4string")))) { cat(strsplit(wkt(o), "\n")[[1]], sep="\n") cat(strsplit(wkt(slot(o, "proj4string")), "\n")[[1]], sep="\n") }#> PROJCRS["OSGB 1936 / British National Grid", #> BASEGEOGCRS["OSGB 1936", #> DATUM["OSGB 1936", #> ELLIPSOID["Airy 1830",6377563.396,299.3249646, #> LENGTHUNIT["metre",1]]], #> PRIMEM["Greenwich",0, #> ANGLEUNIT["degree",0.0174532925199433]], #> ID["EPSG",4277]], #> CONVERSION["British National Grid", #> METHOD["Transverse Mercator", #> ID["EPSG",9807]], #> PARAMETER["Latitude of natural origin",49, #> ANGLEUNIT["degree",0.0174532925199433], #> ID["EPSG",8801]], #> PARAMETER["Longitude of natural origin",-2, #> ANGLEUNIT["degree",0.0174532925199433], #> ID["EPSG",8802]], #> PARAMETER["Scale factor at natural origin",0.9996012717, #> SCALEUNIT["unity",1], #> ID["EPSG",8805]], #> PARAMETER["False easting",400000, #> LENGTHUNIT["metre",1], #> ID["EPSG",8806]], #> PARAMETER["False northing",-100000, #> LENGTHUNIT["metre",1], #> ID["EPSG",8807]], #> ID["EPSG",19916]], #> CS[Cartesian,2], #> AXIS["(E)",east, #> ORDER[1], #> LENGTHUNIT["metre",1, #> ID["EPSG",9001]]], #> AXIS["(N)",north, #> ORDER[2], #> LENGTHUNIT["metre",1, #> ID["EPSG",9001]]], #> USAGE[ #> SCOPE["unknown"], #> AREA["UK - Britain and UKCS 49°46'N to 61°01'N, 7°33'W to 3°33'E"], #> BBOX[49.75,-9.2,61.14,2.88]]] #> PROJCRS["OSGB 1936 / British National Grid", #> BASEGEOGCRS["OSGB 1936", #> DATUM["OSGB 1936", #> ELLIPSOID["Airy 1830",6377563.396,299.3249646, #> LENGTHUNIT["metre",1]]], #> PRIMEM["Greenwich",0, #> ANGLEUNIT["degree",0.0174532925199433]], #> ID["EPSG",4277]], #> CONVERSION["British National Grid", #> METHOD["Transverse Mercator", #> ID["EPSG",9807]], #> PARAMETER["Latitude of natural origin",49, #> ANGLEUNIT["degree",0.0174532925199433], #> ID["EPSG",8801]], #> PARAMETER["Longitude of natural origin",-2, #> ANGLEUNIT["degree",0.0174532925199433], #> ID["EPSG",8802]], #> PARAMETER["Scale factor at natural origin",0.9996012717, #> SCALEUNIT["unity",1], #> ID["EPSG",8805]], #> PARAMETER["False easting",400000, #> LENGTHUNIT["metre",1], #> ID["EPSG",8806]], #> PARAMETER["False northing",-100000, #> LENGTHUNIT["metre",1], #> ID["EPSG",8807]], #> ID["EPSG",19916]], #> CS[Cartesian,2], #> AXIS["(E)",east, #> ORDER[1], #> LENGTHUNIT["metre",1, #> ID["EPSG",9001]]], #> AXIS["(N)",north, #> ORDER[2], #> LENGTHUNIT["metre",1, #> ID["EPSG",9001]]], #> USAGE[ #> SCOPE["unknown"], #> AREA["UK - Britain and UKCS 49°46'N to 61°01'N, 7°33'W to 3°33'E"], #> BBOX[49.75,-9.2,61.14,2.88]]]