R/read_postgis.R

Defines functions read_postgis

Documented in read_postgis

#' Read a spatial vector object from postgis
#'
#' Read a spatial vector object from the datacube postgis tables
#' 
#' @param layername name of layer
#'
#' @return a sf object with the postgis layer
#'
#' @importFrom sf st_read
#'
#' @export

read_postgis  <- function(layername) {
    sf::st_read(get_pgDSN(),paste("gis",layername,sep="."))
}
jspijker/datacube documentation built on Oct. 26, 2019, 4:30 p.m.