rpostgis (version 1.4.3)

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

Author

David Bucklin david.bucklin@gmail.com

Mathieu Basille basille@ufl.edu

Examples

Run this code
if (FALSE) {
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")
}

Run the code above in your browser using DataLab