[R-sig-Geo] Load R sp vector layers in QGIS
Agustin Lobo
aloboaleu at gmail.com
Thu Jun 19 13:57:56 CEST 2008
Carson,
This is geting close to my dreams, but
when I try to load the plugin, I get:
An error has occured while executing Python code:
Traceback (most recent call last):
File "", line 1, in
File "/home/alobo/.qgis//python/plugins/loadRlayer/loadRlayer.py",
line 58, in initGui
self.fileBar = self.iface.fileToolBar()
AttributeError: fileToolBar
(using QGIS 0.10 on ubuntu hardy from binaries, trying to build another
version from svn)
Agus
cfarmer wrote:
> Hello lists,
>
> Apologies for cross posting, but I thought this might be of interest to
> all groups...
>
> Thanks to the excellent work of Martin Dobias on the QgsMemoryProvider, I
> have created a simple plugin which acts as an additional file type handler
> for R sp vector objects in QGIS.
>
> To use:
> 1) In R ( or manageR ;) ), create an sp vector object
> (SpatialPointsDataFrame, SpatialPolygonsDataFrame, SpatialLinesDataFrame).
> 2) Save the sp object to a .Rdata file
> 3) Enable the plugin in QGIS (the button should appear in the file toolbar
> along with 'add vector layer', 'add raster layer', etc..
> 4) Click 'loadRlayer' button, and browse to your .Rdata file
> 5) The plugin should do the rest, and voila! Your R spatial layer should
> be displayed on the QGIS map canvas.
>
> To get it:
> 1) It is available from: 'http://www.geog.uvic.ca/spar/carson/'
> or
> 2) Add 'http://www.geog.uvic.ca/spar/carson/cfarmerQgisRepo.xml' to your
> repositories list in QGIS
>
> Notes:
> 1) When possible, the spatial reference information is taken from the sp
> object
> 2) The name is also taken from the sp object, not the name of the .Rdata file
> 3) Your .Rdata file should only contain a single sp object
> 4) I haven't tested this on multipoint or multiline features...?
> 5) You should be able to do all the normal things that vector layers in
> QGIS can do (except for save edits).
> 6) Note that at this point, changes to the layer in QGIS will not be
> reflected in the initial sp object, thus, this plugin is primarily for
> visualizing your sp vector objects.
>
> Hope you enjoy!
>
> Carson
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
--
Dr. Agustin Lobo
Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
LLuis Sole Sabaris s/n
08028 Barcelona
Spain
Tel. 34 934095410
Fax. 34 934110012
email: Agustin.Lobo at ija.csic.es
http://www.ija.csic.es/gt/obster
More information about the R-sig-Geo
mailing list