postGIStools-package: postGIStools: Tools for interacting with PostgreSQL / PostGIS...

Description Key Functions


postGIStools facilitates the import/export of data tables between R and PostgreSQL, in particular those with associated geometries (PostGIS extension) and hstore (key-value pairs) type columns.

Key Functions

get_postgis_query works like dbGetQuery, with the additional benefit of parsing hstore types (as a list-column in the resulting R data frame) and geometry types (producing a spatial data frame in R).

%->% reproduces the behavior of the PostgreSQL hstore -> key operator.

postgis_insert and postgis_update respectively insert new rows or update existing rows in a PostgreSQL table based on the contents of a R data frame. For spatial data and hstore columns, they performs the same conversions as get_postgis_query, in reverse.

Search within the postGIStools package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.