6
votes
Intersecting lines and polygons and calculating line length in R?
I would recommend to use the sf package. You should also consider to use a projected CRS, in your case one, that is true to distance.
library("sf")
library("dplyr")
poly = read_sf("grille.shp")
line ...
3
votes
Accepted
Using if statement in R script within QGIS
With the new R processing provider, when you give the user selection options, the options are returned as integers starting with 0 (Python indexing format - not R's which would start with 1!).
This ...
3
votes
Using multiple Boolean variables in R script within QGIS
Just found the solution,
##test1=group
##Sensor=selection S1;S2;S1 AND S2
if (Sensor == "S1"){
print("It is working")
}
I think there is little information or non-unified place to find ...
3
votes
Load (input) and Save (output) rds files with R in QGIS script
Look at Basic rules for writing Python scripts for Processing Toolbox in QGIS
##input_file=file
##output_file =output file
2
votes
Accepted
Defining GRASS region in RQGIS?
We have now implemented a support for ParameterMultipleInput-parameters in RQGIS. When providing a list as argument for such a parameter, RQGIS will now also determine the GRASS_REGION_PARAMETER. So ...
2
votes
Defining GRASS region in RQGIS?
If you would like to specify the GRASS_REGION_PARAMETER yourself, you would have to use the notation accepted by the QGIS API (see https://docs.qgis.org/2.8/en/docs/user_manual/processing/console.html)...
2
votes
Knowing TYPE parameters accepted values for RQGIS?
Obviously, you want to use another projection, therefore we reproject your data:
library("sp")
neto <- readRDS("neto.rds")
neto_projected <- spTransform(neto, CRS("+init=epsg:31983"))
Next, ...
2
votes
Accepted
Load (input) and Save (output) rds files with R in QGIS script
In addition of @gene answer... You should train your model inside R-Qgis script. Because if layer names are different, the script will raise an error.
Reproducible example (in R):
library(raster)
...
2
votes
Accepted
Zonal Histograms in RQGIS3
I was able to find the algorithm name using find_algorithms()[grep("histogram",find_algorithms()] which led me to native:zonalhistogram instead of the expected qgis:zonalhistogram. And, it appears ...
2
votes
Accepted
Is it possible to default an output directory for R Scripts in QGIS 3.4.4?
Unfortunately that's not supported - it might be worth filing a Feature Request on the QGIS tracker to see if it can be implemented in a future release.
1
vote
QGIS and use of Python/R
QGIS tools run based on C++ and not Python, as MrXsquared and marcelo pointed me out. Still, you don't need to know any programming language to use the tools. The GUI is sufficient for many tasks. In ...
1
vote
ERROR: Could not find a version that satisfies the requirement qgis
RQGIS only works with QGIS2, and I assume that you have already installed QGIS3. Hence, use RQGIS3, you can find it under https://github.com/jannes-m/RQGIS3. So far, it is not on CRAN due to an ...
1
vote
Slope, curvature, aspect with RQIS 3
The following code works including the load_output option. Just out of curiosity, are you running RQGIS3 from within RStudio? Because in my case running RQGIS3::open_app() crashes the RStudio R ...
1
vote
Slope, curvature, aspect with RQIS 3
For me, run_qgis creates a bundle of .sdat files in the working directory:
> list.files(wd,pattern="*.sdat$")
[1] "aspect.sdat" "crossSectionalCurvature.sdat"
[3] "...
1
vote
Accepted
SAGA command line not working
I've finally fixed it. I think there where multiple problems which made more complicated finding a solution.
First error, SAGA command requires a .sgrd file. You CANNOT give it a .tif. This ...
1
vote
Accepted
Applying advanced parameter settings with RQGIS?
Joseph has already told you the correct answer. But just to make it clear. To find out about possible values for a specific parameter, run get_usage(). In your case run:
get_usage("grass7:r.stream....
1
vote
Sample values from a grid by points in RQGIS
If you have a look at the source code of pick.from.saga.grid, you will realize that it is an independent R function. That means the function does not use SAGA in the background but instead uses an ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
rqgis × 21r × 18
qgis × 17
pyqgis × 4
qgis-processing × 4
python × 2
qgis-plugins × 2
qgis-3 × 1
data × 1
import × 1
saga × 1
zonal-statistics × 1
sf × 1
grids-graticules × 1
atlas × 1
reclassify × 1
gui × 1
format × 1
random-forest × 1
histogram × 1
qgis-grass-plugin × 1
graphics × 1
toolbox × 1
grass-7.2 × 1
sample × 1