I have the need to bring spatial data into R from a postgres database.  I am
trying to do this right now using rgdal with a command similar to the
following:

results=readOGR("PG:dbname='dbname' host='hostname' port='portnum'
user='username' password='pass' <password='p...@ssw0rd'>, layer="tablename")

This works in bringing back all data from the entire table.  However, this
is a very large table and I was wondering if there was a way to run a query
against the table instead of bringing back all data using readOGR.  I have
found no examples anywhere and have even seen suggestions that it is not
possible.  Is this the case?  If there are other libraries that support R's
SP library that allow access to postgres that would be great to know too.

Any help is much appreaciated.

Thanks.

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to