pgGetRast: Load raster from PostGIS database.

Description Usage Arguments Value Author(s) Examples

View source: R/pgGetRast.R

Description

Retrieve rasters from a PostGIS table.

Usage

1
2
pgGetRast(conn, name, rast = "rast", band = 1, digits = 5,
  boundary = NULL)

Arguments

conn

A connection object to a PostgreSQL database

name

A character string specifying a PostgreSQL schema and table/view name holding the geometry (e.g., name = c("schema","table"))

rast

Name of the column in name holding the raster object

band

Index number for the band to retrieve (defaults to 1)

digits

numeric (default = 5), precision for detecting whether cells are on a regular grid (a low number of digits is a low precision). Unequal cell lengths (to this precision) in either X or Y dimensions will result in an error. From rasterFromXYZ function (raster package).

boundary

sp object or numeric. A Spatial* object, whose bounding box will be used to select the part of the raster to import. Alternatively, four numbers (e.g. c([top], [bottom], [right], [left])) indicating the projection-specific limits with which to clip the raster. boundary = NULL (default) will return the full raster.

Value

RasterLayer

Author(s)

David Bucklin dbucklin@ufl.edu

Examples

1
2
3
4
5
6
## Not run: 
pgGetRast(conn, c("schema", "tablename"))
pgGetRast(conn, c("schema", "DEM"), digits = 9, boundary = c(55,
    50, 17, 12))

## End(Not run)

rpostgis documentation built on May 19, 2017, 11:43 a.m.

Search within the rpostgis package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.