pgisGetEPSG: Get EPSG of a table

Description Usage Arguments Value Examples

View source: R/geometry.R

Description

Get EPSG of a table

Usage

1
pgisGetEPSG(conn, tbl, geom.col = "geometry")

Arguments

conn

a PostgreSQLConnection object.

tbl

character; table name.

geom.col

character; name of the geometry column (default: 'geometry).

Value

a numeric EPSG code of 4 numbers.

Examples

1
2
3
4
5
6
7
8
9
library(spData)
library(sf)
library(RPostgreSQL)
data(seine)
conn = dbConnect(drv=dbDriver("PostgreSQL"), host="localhost", port=5432,
                dbname="foodflows", user="milo", password="postgres")
dbWriteTable(conn, name="seine", seine, overwrite=TRUE)
(pgisGetEPSG(conn, "seine")==2154)
dbDisconnect(conn)

MiloMonnier/postgisr documentation built on Feb. 16, 2021, 8:03 p.m.