Description Usage Arguments Value Examples
Load a raster stored in a PostgreSQL database into R.
1 2 |
conn |
A connection object created in RPostgreSQL package. |
table |
Name of the schema-qualified table in Postgresql holding the raster. |
rast |
Name of the column in 'table' holding the raster object |
proj |
Can be set to TRUE to automatically take the SRID for the table in the database. Alternatively, the number of EPSG-specified projection of the geometry (Default is NULL, resulting in no projection.) |
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) |
NSEW |
numeric, clipping box for raster with four arguments (north, south, east, west) indicating the projection-specific limits with which to clip the raster. |
RasterLayer
1 2 3 4 5 6 | #library(RPostgreSQL)
#drv<-dbDriver("PostgreSQL")
#conn<-dbConnect(drv,dbname='dbname',host='host',port='5432',user='user',password='password')
#pgis2rast(conn,'schema.tablename')
#pgis2rast(conn,'schema.tablename',proj=4326,digits=9,NSEW=c(55,50,17,12))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.