[Gfoss] Plugin per caricare oggetti sp di R in QGis

G. Allegri giohappy a gmail.com
Gio 19 Giu 2008 09:36:42 CEST


Cross-posting, ma credo d'interesse.
Carson Farmer, il piu' produttivo "qgispluginista" che conosco, ha
realizzato un plugin per QGis che permette di caricare layer
vettoriali e raster salvati nell' .RData di R in forma di oggetti sp.
Sotto le spiegazioni di Carson. Il link del plugin e':
http://www.geog.uvic.ca/spar/carson/cfarmerQgisRepo.xml

Giovanni


---------- Forwarded message ----------
From: cfarmer <cfarmer a uvic.ca>
Date: 2008/6/19
Subject: [Qgis-user] Load R sp vector layers in QGIS
To: qgis-developer a lists.osgeo.org, qgis-user a lists.osgeo.org
Cc: r-sig-geo a stat.math.ethz.ch


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

_______________________________________________
Qgis-user mailing list
Qgis-user a lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user



Maggiori informazioni sulla lista Gfoss