ltraj2pgtraj: Export ltraj object from R to a PostGIS database.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/ltraj2pgtraj.R

Description

ltraj2pgtraj exports an ltraj to the a database pgtraj, creating a new pgtraj schema if it doesn't exist. The time zone and projection information stored in the ltraj is transferred to the database.

Usage

1
2
ltraj2pgtraj(conn, ltraj, schema = "traj", pgtraj = NULL, note = NULL,
  overwrite = FALSE, infolocs = TRUE)

Arguments

conn

A connection object.

ltraj

An object of class ltraj.

schema

Character. Name of the schema that stores or will store the pgtraj data model.

pgtraj

Character. Name of the new pgtraj. Defaults to the name of the provided ltraj.

note

Character. A note that will be stored with the pgtraj in the database.

overwrite

Logical. Use if a pgtraj with the same name as the provided ltraj already exists in the database: If TRUE, the existing pgtraj is deleted and the provided ltraj is inserted. If FALSE, the function exits. Note that overwrite requires an exact match among the pgtraj names otherwise it is ignored.

infolocs

Logical. Whether to write infolocs to database.

Value

TRUE on success.

Author(s)

Balázs Dukai balazs.dukai@gmail.com

See Also

asPgtraj to create a pgtraj with data already stored in the database.

Examples

1
2
3
4
5
## Not run: 
  # create pgtraj from ltraj "ibex" in schema "traj_t2"
  ltraj2pgtraj(conn, ibex, "traj_t2")

## End(Not run)

mablab/rpostgisLT documentation built on May 10, 2020, 9:35 a.m.