Learn R Programming

rpostgis (version 1.0.0)

pgGetPolys: Load a PostGIS polygon geometry from a PostgreSQL table/view into R.

Description

Load a PostGIS polygon geometry from a PostgreSQL table/view into R.

Usage

pgGetPolys(conn, name, geom = "geom", gid = NULL, other.cols = "*", clauses = NULL)

Arguments

Value

SpatialPolygonsDataFrame or SpatialPolygons

Examples

Run this code
## Not run: 
# pgGetPolys(conn, c("schema", "tablename"))
# pgGetPolys(conn, c("schema", "states"), geom = "statesgeom",
#     gid = "state_ID", other.cols = "area,population",
#     clauses  = "WHERE area > 1000000 ORDER BY population LIMIT 10")
# ## End(Not run)

Run the code above in your browser using DataLab