Description Usage Arguments Author(s)
it returns the spatialPolygonDataFrame with its projection, but it only works if there is one single projection system in the table
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") |
schemaname |
name of the schema in which the table is stored. 'public' is the default |
tablename |
string name of the table to be imported |
geomcol |
the field name in which geometry info are stored |
idcol |
Name of the column with unique IDs to be used in the ID slot of the spatial objects (not relevant for point data) |
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.