dbWriteSpatial: Write spatial data to a PostGIS table

Description Usage Arguments Details Value

Description

dbWriteSpatial writes a Spatial*DataFrame to a PostGIS table

Usage

1
2
dbWriteSpatial(con, spatial.df, schemaname = "public", tablename,
  srid = NULL, replace = FALSE)

Arguments

con

A valid PostgreSQL connection (from RPostgreSQL)

spatial.df

A valid Spatial*DataFrame

schemaname

Schema where the target table of interest will reside

tablename

Name of the target database table.

srid

SRID value to be passed to PostGIS (may not be needed)

replace

Specify whether an existing table should be replaced

Details

This is a function for writing spatial data directly to PostgreSQL/PostGIS table from an appropriate Spatial*DataFrame. The function relies on the GeoJSON format to transfer the spatial data. The non-geometry columns in the table are written via the RPostgreSQL package.

Value

TRUE


jmlondon/Rpostgis documentation built on May 19, 2019, 1:53 p.m.