pgGetRast: Load raster from PostGIS database.

Description

Retrieve rasters from a PostGIS table.

Usage

1
2
pgGetRast(conn, name, rast = "rast", band = 1, digits = 9,
  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, precision for detecting whether points are on a regular grid (a low number of digits is a low precision) - 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)

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

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