[Qgis-developer] QGIS - SEXTANTE - R

Victor Olaya volayaf at gmail.com
Fri Feb 22 04:28:18 PST 2013


Matteo

Thanks for your ideas

you can tell SEXTANTE to use the raster package by using

##myraster=raster|R.Raster

instead of

##myraster=raster

This is already documented, but only in the github version of the
documentation, as it is something that is implemented only in the
development versino of SEXTANTE.

Anyway, your proposal seems interesting. I tried to save all the possible
effort from users developing R algorithms in SEXTANTE, but it's true that
you will have more flexibility by just getting the filename.

Honestly, I am not an R expert, so I will implement whatever you the R
users think is best. My goal is to make it easier for anyonen with a good
knowledge of R to adapt their algorithms to SEXTANTE and be able to call
them from QGIS. I am opne to all kind off suggestions, since, as I said, I
am not an R user and my knowledge of R is very limited.

Let's discuss this here in the list.. Hopefully other people using R and
SEXTANTE will give their opinion and we can decide what to do

Many thanks again for your help

Victor




2013/2/22 Matteo Mattiuzzi <matteo at mattiuzzi.com>

> Dear list,
>
> I have now tested the possibilities to integrate R Processing in Q-GIS. I
> think it closes the huge gap in R of interactive visualization and also
> gives the possibility to use R-functionality to non-R people!
>
> I saw that a raster/vector file is loaded through rgdal and there is no
> possibility to do it in the own way, such as the almost standard 'raster'
> package that handles also out of RAM data!
> In order to maintain the flexibility of R I think that arguments should be
> passed as they are (path+file) and everybody would be free to benefit from
> the entire R repository of functions.
> Thanks Matteo
>
> here an example for extracting and plotting pixels based on vector, point
> or polygon shp file:
>
> ##[MyScr]=group
> ##vector=vector
> ##raster=raster
> library(raster)
>
> s <- shapefile(vector) % high level function from raster package, the
> argument should be only the file path+ name
> r <- brick(raster) % high level function from raster package, the argument
> should be only the file path+ name
>
> v <- extract(r,s)
> ##showplots
> for(u in seq_along(v))
> {
>     val <- v[[u]]
>     if(u>1) X11()
>
>
> plot(x=1:ncol(val),ylim=c(min(val),max(val)),type="n",main=paste("Extraction
> line",u),xlab="Band",ylab="Spectral")
>
>     for(i in 1:nrow(val))
>     {
>        lines(val[i,],col=i)
>     }
> }
>
> ############################
> LINUX Ubuntu 12.10
> QGIS version1.9.0-MasterQGIS code revision 2a2465eCompiled against Qt4.8.1Running
> against Qt4.8.1Compiled against GDAL/OGR1.9.2Running against GDAL/OGR1.9.2 GEOS
> Version3.3.3PostgreSQL Client Version9.1.8SpatiaLite Version3.1.0-RC2QWT
> Version5.2.2PROJ.4 Version480QScintilla2 Version This copy of QGIS writes
> debugging output.
>
> R version 2.15.2 (2012-10-26) -- "Trick or Treat"
>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20130222/a7187f5f/attachment-0001.html>


More information about the Qgis-developer mailing list