Skip to main content
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 ...
Jannes's user avatar
  • 672
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 ...
Simbamangu's user avatar
  • 14.9k
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 ...
GCGM's user avatar
  • 1,138
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
gene's user avatar
  • 55.4k
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 ...
Jannes's user avatar
  • 672
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)...
Jannes's user avatar
  • 672
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, ...
Jannes's user avatar
  • 672
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) ...
aldo_tapia's user avatar
  • 13.8k
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 ...
Glenn Stauffer's user avatar
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.
ndawson's user avatar
  • 27.9k
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 ...
Erik's user avatar
  • 17.1k
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 ...
Jannes's user avatar
  • 672
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 ...
Jannes's user avatar
  • 672
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] "...
Spacedman's user avatar
  • 66.5k
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 ...
Bastien's user avatar
  • 649
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....
Jannes's user avatar
  • 672
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 ...
Jannes's user avatar
  • 672

Only top scored, non community-wiki answers of a minimum length are eligible