<div dir="ltr">Dear list,<div><br></div><div style>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!</div>
<div style><br></div><div style>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!</div>
<div style>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.</div><div style>Thanks Matteo</div>
<div style><br></div><div style>here an example for extracting and plotting pixels based on vector, point or polygon shp file:</div><div style><br></div><div style><div>##[MyScr]=group</div><div>##vector=vector</div><div>
##raster=raster</div><div>library(raster)</div><div><br></div><div>s <- shapefile(vector) % high level function from raster package, the argument should be only the file path+ name</div><div>r <- brick(raster) % high level function from raster package, the argument should be only the file path+ name</div>
<div><br></div><div>v <- extract(r,s)</div><div>##showplots</div><div>for(u in seq_along(v))</div><div>{</div><div> val <- v[[u]]</div><div> if(u>1) X11()</div><div> </div><div> plot(x=1:ncol(val),ylim=c(min(val),max(val)),type="n",main=paste("Extraction line",u),xlab="Band",ylab="Spectral")</div>
<div><br></div><div> for(i in 1:nrow(val))</div><div> {</div><div> lines(val[i,],col=i)</div><div> }</div><div>}</div><div><br></div><div>############################</div></div><div style>LINUX Ubuntu 12.10</div>
<div style><span class="" style="border-collapse:separate;color:rgb(0,0,0);font-family:Times;border-spacing:0px;font-size:medium"><table width="100%"><tbody><tr><td>QGIS version</td><td>1.9.0-Master</td><td>QGIS code revision</td>
<td>2a2465e</td></tr><tr><td>Compiled against Qt</td><td>4.8.1</td><td>Running against Qt</td><td>4.8.1</td></tr><tr><td>Compiled against GDAL/OGR</td><td>1.9.2</td><td>Running against GDAL/OGR</td><td>1.9.2</td></tr><tr>
<td>GEOS Version</td><td>3.3.3</td><td>PostgreSQL Client Version</td><td>9.1.8</td></tr><tr><td>SpatiaLite Version</td><td>3.1.0-RC2</td><td>QWT Version</td><td>5.2.2</td></tr><tr><td>PROJ.4 Version</td><td>480</td><td>QScintilla2 Version</td>
<td></td></tr><tr><td colspan="4">This copy of QGIS writes debugging output.<br></td><td colspan="4"><br>R version 2.15.2 (2012-10-26) -- "Trick or Treat"<br><br></td></tr></tbody></table></span></div></div>