Learn R Programming

rpostgis (version 1.0.0)

pgPostGIS: Check and create PostGIS extension.

Description

The function checks for the availability of the PostGIS extension, and if it is available, but not installed, install it. Additionnaly, can also install Topology, Tiger Geocoder and SFCGAL extensions.

Usage

pgPostGIS(conn, topology = FALSE, tiger = FALSE, sfcgal = FALSE, display = TRUE, exec = TRUE)

Arguments

conn
A connection object (required, even if exec = FALSE).
topology
Logical. Whether to check/install the Topology extension.
tiger
Logical. Whether to check/install the Tiger Geocoder extension.
sfcgal
Logical. Whether to check/install the SFCGAL extension.
display
Logical. Whether to display the query (defaults to TRUE).
exec
Logical. Whether to execute the query (defaults to TRUE).

Value

TRUE if PostGIS is installed.

Examples

Run this code
## 'exec = FALSE' does not install any extension, but nevertheless
## check for available and installed extensions:
## Not run: 
#     pgPostGIS(con, topology = TRUE, tiger = TRUE, sfcgal = TRUE,
#         exec = FALSE)
# ## End(Not run)

Run the code above in your browser using DataLab