Description Usage Arguments Author(s)
Write spatial vector data in postgres
1 | dbwritespatial(con, myspatialdata.spdf, schemaname="myschema", tablename="myspatialdata", replace=FALSE)
|
con |
set the connection with the database: con <- dbConnect(dbDriver("PostgreSQL"), dbname="postgis", port=5432, host="localhost", user="postgres", password="pw") |
spatial.df |
spatial dataframe to be sent in postgres |
SRID |
set the SRID number ; e.g 3021 is for RT90 |
replace |
if FALSE existing table is not replaced. True table is replaced |
name |
name of the new table to be created |
Philipp Hunziker <https://philipphunziker.wordpress.com/2014/07/20/transferring-vector-data-between-postgis-and-r/>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.