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

(unlinked because of certificate issues: 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")
#> [1] "v10.028"
# PROJ.4 version 5 and later include the EPSG version as an attribute if (!inherits(EPSG, "try-error")) EPSG[grep("Oslo", EPSG$note), 1:2]
#> code note #> 2625 4817 NGO 1948 (Oslo) #> 6163 27391 NGO 1948 (Oslo) / NGO zone I #> 6164 27392 NGO 1948 (Oslo) / NGO zone II #> 6165 27393 NGO 1948 (Oslo) / NGO zone III #> 6166 27394 NGO 1948 (Oslo) / NGO zone IV #> 6167 27395 NGO 1948 (Oslo) / NGO zone V #> 6168 27396 NGO 1948 (Oslo) / NGO zone VI #> 6169 27397 NGO 1948 (Oslo) / NGO zone VII #> 6170 27398 NGO 1948 (Oslo) / NGO zone VIII
if (!inherits(EPSG, "try-error")) EPSG[1925:1927, 3]
#> [1] "+proj=longlat +ellps=NWL9D +no_defs +type=crs" #> [2] "+proj=tmerc +lat_0=0 +lon_0=28.4 +k=0.99994 +x_0=200000 +y_0=-5000000 +ellps=GRS80 +units=m +no_defs +type=crs" #> [3] "+proj=longlat +a=6376523 +rf=308.64 +no_defs +type=crs"
if (!inherits(EPSG, "try-error")) EPSG[grep("Poland", EPSG$note), 1:2]
#> code note #> 172 2171 Pulkovo 1942(58) / Poland zone I #> 173 2172 Pulkovo 1942(58) / Poland zone II #> 174 2173 Pulkovo 1942(58) / Poland zone III #> 175 2174 Pulkovo 1942(58) / Poland zone IV #> 176 2175 Pulkovo 1942(58) / Poland zone V #> 1117 3120 Pulkovo 1942(58) / Poland zone I
if (!inherits(EPSG, "try-error")) EPSG[grep("Amersfoort", EPSG$note), 1:2]
#> code note #> 2149 4289 Amersfoort #> 4234 7415 Amersfoort / RD New + NAP height #> 6270 28991 Amersfoort / RD Old #> 6271 28992 Amersfoort / RD New
if (!inherits(EPSG, "try-error")) EPSG[grep("North Carolina", EPSG$note), 1:2]
#> code note #> 258 2264 NAD83 / North Carolina (ftUS) #> 1355 3358 NAD83(HARN) / North Carolina #> 1356 3359 NAD83(HARN) / North Carolina (ftUS) #> 1401 3404 NAD83(HARN) / North Carolina (ftUS) #> 1628 3631 NAD83(NSRS2007) / North Carolina #> 1629 3632 NAD83(NSRS2007) / North Carolina (ftUS) #> 3718 6542 NAD83(2011) / North Carolina #> 3719 6543 NAD83(2011) / North Carolina (ftUS) #> 4899 8768 NAD83 / North Carolina (ftUS) + NAVD88 height (ftUS) #> 6475 32019 NAD27 / North Carolina #> 6546 32119 NAD83 / North Carolina
if (!inherits(EPSG, "try-error")) EPSG[2202, 3]
#> [1] "+proj=geocent +ellps=GRS80 +units=m +no_defs +type=crs"