dbwritespatial: Write spatial vector data in postgres

Description Usage Arguments Author(s)

Description

Write spatial vector data in postgres

Usage

1
dbwritespatial(con, myspatialdata.spdf, schemaname="myschema", tablename="myspatialdata", replace=FALSE)

Arguments

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

Author(s)

Philipp Hunziker <https://philipphunziker.wordpress.com/2014/07/20/transferring-vector-data-between-postgis-and-r/>


cyrilmi/myfunctions documentation built on May 14, 2019, 1:39 p.m.