[R-sig-Geo] R - PostGIS connectivity

Edzer J. Pebesma e.pebesma at geo.uu.nl
Tue Apr 3 10:17:45 CEST 2007


Dear list members,

I've been exploring a bit the possibilities of PostGIS, and accessing 
its functionality (the GEOS geometry library really) from R. I used 
writeOGR and readOGR from rgdal to move sp objects in and out the data 
base, and used sqlQuery from RODBC to do a spatial query on the data 
base. Preliminary results can be found on 
http://wiki.intamap.org/index.php/PostGIS

The next step could be to wrap these kind of steps in functions that 
hide the fact that there's an RDBMS and some SQL involved. The full set 
of OpenGIS functions 
(http://postgis.refractions.net/docs/ch06.html#id2852098 ) and PostGIS 
extensions is, however, rather large, and installing PostgreSQL+PostGIS 
besides R is straightforward, but has some overhead too -- I guess we 
can't wrap that in an install.package("rpostgis") call.

I welcome any suggestions or discussion.
--
Edzer




More information about the R-sig-Geo mailing list