Load raster from PostGIS database.

Share:

Description

Retrieve rasters from a PostGIS table.

Usage

1
pgGetRast(conn, name, rast = "rast", digits = 9, boundary = NULL)

Arguments

conn

A connection object to a PostgreSQL database

name

A character string specifying a PostgreSQL schema (if necessary), and table or view name for the table holding the raster (e.g., name = c("schema","table"))

rast

Name of the column in 'name' holding the raster object

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(north, south, east, west)) indicating the projection-specific limits with which to clip the raster. 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)