1suppressPackageStartupMessages(library(rgdal))
2if (new_proj_and_gdal()) {
3get_enforce_xy()
4x0 <- showSRID("EPSG:4326", multiline=TRUE, EPSG_to_init=FALSE)
5cat(x0, "\n")
6set_enforce_xy(FALSE)
7x1 <- showSRID("EPSG:4326", multiline=TRUE, EPSG_to_init=FALSE)
8cat(x1, "\n")
9set_enforce_xy(TRUE)
10x2 <- showSRID("EPSG:4326", multiline=TRUE, EPSG_to_init=FALSE)
11cat(x2, "\n")
12get_enforce_xy()
13y0 <- showSRID("EPSG:4326", multiline=TRUE, EPSG_to_init=FALSE, prefer_proj=TRUE)
14cat(y0, "\n")
15showSRID("EPSG:4326", format="PROJ", EPSG_to_init=FALSE, prefer_proj=TRUE)
16set_enforce_xy(FALSE)
17y1 <- showSRID("EPSG:4326", multiline=TRUE, EPSG_to_init=FALSE, prefer_proj=TRUE)
18cat(y1, "\n")
19showSRID("EPSG:4326", format="PROJ", EPSG_to_init=FALSE, prefer_proj=TRUE)
20set_enforce_xy(TRUE)
21y2 <- showSRID("EPSG:4326", multiline=TRUE, EPSG_to_init=FALSE, prefer_proj=TRUE)
22cat(y2, "\n")
23showSRID("EPSG:4326", format="PROJ", EPSG_to_init=FALSE, prefer_proj=TRUE)
24}
25
26