Make a data frame of the European Petroleum Survey Group (EPSG) geodetic parameter dataset as distributed with PROJ.4 software (prior to PROJ 6.0.0, March 2019, only the CSV file, from March 2019 with PROJ >= 6 from the SQLite database). Because finding the correct projection specification is not easy, lists still known as EPSG lists are maintained, and more generally retrieved from databases. The data collated here are as distributed with PROJ.4.

make_EPSG(file)

Arguments

file

file name of the file matching EPSG codes and PROJ.4 arguments, should usually be autodetected; not used for PROJ >= 6

Value

returns a data frame with columns:

code

integer column of EPSG code numbers

note

character column of notes as included in the file

prj4

character column of PROJ.4 arguments for the equivalent projection definitions

prj_method

extra character column from PROJ 6 showing the projection method

...

References

(Currently invalid certificate, URL otherwise valid https://epsg.org/home.html).

Author

Roger Bivand

Note

See also Clifford J. Mugnier's Grids \& Datums columns in Photogrammetric Engineering & Remote Sensing, https://www.asprs.org/a/resources/grids/, see also GridsDatums.

Examples

EPSG <- try(make_EPSG()) # from PROJ 6.0.0, EPSG data is no longer stored in a flat file if (!inherits(EPSG, "try-error")) attr(EPSG, "metadata")
#> NULL
# PROJ.4 5.0.0 and later include EPSG version if (!inherits(EPSG, "try-error")) EPSG[grep("Oslo", EPSG$note), 1:2]
#> code note #> 515 4817 NGO 1948 (Oslo) #> 2434 27391 NGO 1948 (Oslo) / NGO zone I #> 2435 27392 NGO 1948 (Oslo) / NGO zone II #> 2436 27393 NGO 1948 (Oslo) / NGO zone III #> 2437 27394 NGO 1948 (Oslo) / NGO zone IV #> 2438 27395 NGO 1948 (Oslo) / NGO zone V #> 2439 27396 NGO 1948 (Oslo) / NGO zone VI #> 2440 27397 NGO 1948 (Oslo) / NGO zone VII #> 2441 27398 NGO 1948 (Oslo) / NGO zone VIII
if (!inherits(EPSG, "try-error")) EPSG[1925:1927, 3]
#> [1] "+proj=tmerc +lat_0=0 +lon_0=72 +k=1 +x_0=24500000 +y_0=0 +ellps=krass +units=m +no_defs +type=crs" #> [2] "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=25500000 +y_0=0 +ellps=krass +units=m +no_defs +type=crs" #> [3] "+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=26500000 +y_0=0 +ellps=krass +units=m +no_defs +type=crs"
if (!inherits(EPSG, "try-error")) EPSG[grep("Poland", EPSG$note), 1:2]
#> code note #> 1370 2171 Pulkovo 1942(58) / Poland zone I #> 1371 2172 Pulkovo 1942(58) / Poland zone II #> 1372 2173 Pulkovo 1942(58) / Poland zone III #> 1373 2174 Pulkovo 1942(58) / Poland zone IV #> 1374 2175 Pulkovo 1942(58) / Poland zone V #> 1375 2176 ETRS89 / Poland CS2000 zone 5 #> 1376 2177 ETRS89 / Poland CS2000 zone 6 #> 1377 2178 ETRS89 / Poland CS2000 zone 7 #> 1381 2179 ETRS89 / Poland CS2000 zone 8 #> 1382 2180 ETRS89 / Poland CS92 #> 3017 3120 Pulkovo 1942(58) / Poland zone I
if (!inherits(EPSG, "try-error")) EPSG[grep("Amersfoort", EPSG$note), 1:2]
#> code note #> 230 4289 Amersfoort #> 2701 28991 Amersfoort / RD Old #> 2702 28992 Amersfoort / RD New #> 6552 7415 Amersfoort / RD New + NAP height
if (!inherits(EPSG, "try-error")) EPSG[grep("North Carolina", EPSG$note), 1:2]
#> code note #> 1516 2264 NAD83 / North Carolina (ftUS) #> 3206 32019 NAD27 / North Carolina #> 3287 32119 NAD83 / North Carolina #> 3867 3358 NAD83(HARN) / North Carolina #> 3868 3359 NAD83(HARN) / North Carolina (ftUS) #> 3913 3404 NAD83(HARN) / North Carolina (ftUS) #> 4140 3631 NAD83(NSRS2007) / North Carolina #> 4141 3632 NAD83(NSRS2007) / North Carolina (ftUS) #> 5235 6542 NAD83(2011) / North Carolina #> 5236 6543 NAD83(2011) / North Carolina (ftUS) #> 6636 8768 NAD83 / North Carolina (ftUS) + NAVD88 height (ftUS)
if (!inherits(EPSG, "try-error")) EPSG[2202, 3]
#> [1] "+proj=lcc +lat_0=43 +lon_0=-94 +lat_1=45.2166666666667 +lat_2=43.7833333333333 +x_0=800000.00001016 +y_0=99999.99998984 +ellps=GRS80 +units=m +no_defs +type=crs"