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

Share:

Description

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

Usage

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

Value

SpatialPolygonsDataFrame or SpatialPolygons

Author(s)

David Bucklin dbucklin@ufl.edu

Mathieu Basille basille@ufl.edu

Examples

1
2
3
4
5
6
7
## 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)