showWKT | R Documentation |
In modern workflows with PROJ >= 6 and GDAL >= 3, use only showSRID()
DEPRECATED: Use GDAL/OGR spatial reference objects to convert a PROJ.4 representation to a Well-Known Text representation, and report an EPSG code if it can be determined by OGR SRS services.
showP4(wkt, morphFromESRI=FALSE, enforce_xy = NULL)
showSRID(inSRID, format="WKT2", multiline="NO", enforce_xy = NULL, EPSG_to_init=TRUE,
prefer_proj=NULL)
get_P6_datum_hard_fail()
set_P6_datum_hard_fail(value)
get_thin_PROJ6_warnings()
set_thin_PROJ6_warnings(value)
get_prefer_proj()
set_prefer_proj(value)
get_rgdal_show_exportToProj4_warnings()
set_rgdal_show_exportToProj4_warnings(value)
get_PROJ6_warnings_count()
OSRIsProjected(obj)
enforce_xy |
(PROJ6+/GDAL3+) either use global setting (default NULL) or override policy for coordinate ordering easting/x as first axis, northing/y as second axis. |
wkt |
A valid WKT character string representing a spatial reference system |
morphFromESRI |
default TRUE, morph the WKT string from the representation used by ESRI |
inSRID |
Input coordinate reference string |
obj |
valid CRS object |
format |
Output format, default WKT2 |
multiline |
Multiline output, either |
EPSG_to_init |
default TRUE, workaround for PROJ 6.3.0 frailty leading to the dropping of +ellps= and +units=; DATUM seems to disappear in the internal definition |
prefer_proj |
default NULL, if TRUE, use PROJ compiled code directly, rather than FALSE using PROJ via GDAL SRS; if NULL, uses value shown by |
value |
a logical value. For |
For showWKT
, a character string containing the WKT representation of the PROJ.4 string.
The options("rgdal_show_exportToProj4_warnings"="x")
may be used before loading rgdal to set the internal logical variables; if the option is set to "all"
, all warnings reporting CRS degradation stemming from the GDAL OSR function exportToProj4()
even if trivial are reported; if set to "thin"
, all warnings are detected but thinned so that one report is given per function call; if set to "none"
, the degradations are detected but not reported.
Roger Bivand
https://gdal.org/tutorials/osr_api_tut.html
is.projected
, CRS-class
set_thin_PROJ6_warnings(TRUE)
cities <- readOGR(system.file("vectors", package = "rgdal")[1], "cities")
readLines(system.file("vectors/cities.prj", package = "rgdal")[1])
showP4(showWKT("+init=epsg:28992"))
exts <- rgdal_extSoftVersion()
run <- new_proj_and_gdal()
if (run) {
cat(showSRID("EPSG:27700", multiline="YES"), "\n")
}
if (run) {
(prj <- showSRID("EPSG:27700", "PROJ"))
}
if (run) {
showSRID(paste0(prj, " +datum=OSGB36"), "WKT1")
}
if (run) {
showSRID(paste0(prj, " +towgs84=370.936,-108.938,435.682"), "WKT1")
}
if (run) {
showSRID(paste0(prj, " +nadgrids=OSTN15_NTv2_OSGBtoETRS.gsb"), "WKT1")
}
if (run) {
showSRID(paste0(prj, " +datum=OSGB36"), "WKT2")
}
if (run) {
showSRID(paste0(prj, " +towgs84=370.936,-108.938,435.682"), "WKT2")
}
if (run) {
showSRID(paste0(prj, " +nadgrids=OSTN15_NTv2_OSGBtoETRS.gsb"), "WKT2")
}
if (run) {
showSRID("ESRI:102761", "WKT2")
}
if (run) {
showSRID("OGC:CRS84", "WKT2")
}
if (run) {
showSRID("urn:ogc:def:crs:OGC:1.3:CRS84", "WKT2")
}
if (run) {
try(showSRID("", "WKT2"))
}
OSRIsProjected(CRS("+proj=longlat"))
OSRIsProjected(CRS("+proj=geocent"))
OSRIsProjected(CRS("+proj=geocent +units=km"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.