[R-sig-Geo] Qgis and R ?

Don MacQueen macq at llnl.gov
Wed Dec 5 05:30:54 CET 2007


At 9:00 AM +0000 12/4/07, Barry Rowlingson wrote:
>Agustin Lobo wrote:
>>  Hi!
>>
>>  Does anyone has experience at displaying spatial R objects
>>  with QGis (perhaps using the python console + Rpy or RSpython)?
>>  I'm thinking on starting some testing and would like to know
>>  about previous experiences.
>
>   I've done a bit of work on this and I think the current best option
>would be to save the R Spatial objects as shapefiles and then load them
>into QGis. For raster data I save as ESRI Ascii Grid format.
>
>   Here's some other ideas:
>
>    * write a data provider for QGis in Python that uses Rpy to fetch the
>data from an R Spatial object stored in a .RData file.

For what (little?) it's worth, I have been doing this quite a bit, 
lately. I sometimes edit the objects in QGis, then reload them into R.

>      Advantages: neat and well-integrated
>
>      Disadvantages: tricky. might need some changes to the QGis C++
>codebase. Only works in QGis.
>
>    * write a GDAL/OGR driver for R Spatial objects.
>
>      Advantages: every project that uses GDAL/OGR can use it. Frank
>Warmerdam would think it's a good idea.
>
>      Disadvantages: would have to be in C++, I'm not sure how to write
>GDAL/OGR drivers that use external libraries (libR.so in this case).
>
>I think writing the GDAL/OGR driver would be the right thing in this
>case, but it would require someone with lots of R and C experience to
>code it up. Start here: http://www.gdal.org/ogr/ogr_drivertut.html
>
>Barry
>
>_______________________________________________
>R-sig-Geo mailing list
>R-sig-Geo at stat.math.ethz.ch
>https://stat.ethz.ch/mailman/listinfo/r-sig-geo


-- 
---------------------------------
Don MacQueen
Lawrence Livermore National Laboratory
Livermore, CA, USA
925-423-1062
macq at llnl.gov




More information about the R-sig-Geo mailing list