Closed glaroc closed 7 years ago
Hi @glaroc ,
You're right that this is not possible with the current pgGetGeom
(which imports from one table/view only), though it appears it can be easily implemented as a new feature using temporary views. I'll keep you posted on adding this feature to our dev
branch, and in the next CRAN release.
This feature is now incorporated in pgGetGeom
, see the query
argument and details/example.
Now on the dev
branch, install using:
devtools::install_github("mablab/rpostgis",ref = "dev")
This and other recent updates will be included in the next CRAN version.
@dnbucklin Works like a charm. Great job!
It would be great to have a function in RPostGIS that could be used to run any more complex SQL functions that involves multiple layers. For example, as far as I understand, it is not possible to run a ST_Within() between layers to return a spatial object with pgGetGeom() at the moment. Why not just create a function that sends any SQL statement to PostGIS and returns the result as a spatial data frame? @basille