r-spatial / qgisprocess

R package to use QGIS processing algorithms
https://r-spatial.github.io/qgisprocess/
GNU General Public License v3.0
198 stars 20 forks source link

qgis_process path issue? #86

Closed barnabasharris closed 1 year ago

barnabasharris commented 2 years ago

Hi, When I run qgis_process on the command line I get:

qgis_process list
QApplication: invalid style override passed, ignoring it.
    Available styles: Windows, Fusion
/usr/lib/python3/dist-packages/qgis/utils.py:799: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  mod = _builtin_import(name, globals, locals, fromlist, level)
<string>:216: DeprecationWarning: an integer is required (got type Alignment).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
Problem with SAGA installation: SAGA was not found or is not correctly installed
Available algorithms

QGIS (3D)
    3d:tessellate   Tessellate

GDAL
    gdal:aspect Aspect
    gdal:assignprojection   Assign projection
    gdal:buffervectors  Buffer vectors
    gdal:buildvirtualraster Build virtual raster
    gdal:buildvirtualvector Build virtual vector
...

(Not sure about the error but many hundreds of algorithms spanning multiple providers)

which qgis_process returns /usr/bin/qgis_process

But when I run the following in R, I only get the native qgis algorithms...

library(qgisprocess)
options(qgisprocess.path = "/usr/bin/qgis_process")
qgisprocess::qgis_algorithms()
> 
# A tibble: 225 × 27
   provider provider_title    algorithm            algorithm_id algorithm_title provider_id can_cancel deprecated group
   <chr>    <chr>             <chr>                <chr>        <chr>           <chr>       <lgl>      <lgl>      <chr>
 1 3d       QGIS (3D)         3d:tessellate        tessellate   Tessellate      3d          TRUE       FALSE      Vect…
 2 native   QGIS (native c++) native:addautoincre… addautoincr… Add autoincrem… native      TRUE       FALSE      Vect…
 3 native   QGIS (native c++) native:addfieldtoat… addfieldtoa… Add field to a… native      TRUE       FALSE      Vect…
 4 native   QGIS (native c++) native:adduniqueval… adduniqueva… Add unique val… native      TRUE       FALSE      Vect…
 5 native   QGIS (native c++) native:addxyfields   addxyfields  Add X/Y fields… native      TRUE       FALSE      Vect…
 6 native   QGIS (native c++) native:affinetransf… affinetrans… Affine transfo… native      TRUE       FALSE      Vect…
 7 native   QGIS (native c++) native:aggregate     aggregate    Aggregate       native      TRUE       FALSE      Vect…
 8 native   QGIS (native c++) native:angletoneare… angletonear… Align points t… native      TRUE       FALSE      Cart…
 9 native   QGIS (native c++) native:antimeridian… antimeridia… Geodesic line … native      TRUE       FALSE      Vect…
10 native   QGIS (native c++) native:arrayoffsetl… arrayoffset… Array of offse… native      TRUE       FALSE      Vect…
# … with 215 more rows, and 18 more variables: has_known_issues <lgl>, help_url <chr>, name <chr>,

(Just a couple of hundred algorithms, majority of which are native.)

Have I misconfigured the R library somehow?

Further outputs:

> qgis_configure()
Trying getOption('qgisprocess.path'): '/usr/bin/qgis_process'
Success!
QGIS version: 3.18.3-Zürich
Saving configuration to '~/.cache/R-qgisprocess/cache-0.0.0.9000.rds'
Metadata of 225 algorithms queried and stored in cache.
Run `qgis_algorithms()` to see them.
- Using JSON for output serialization
> sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.3 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/liblapack.so.3

locale:
 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C               LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8    
 [5] LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_GB.UTF-8    LC_PAPER=en_GB.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] qgisprocess_0.0.0.9000 raster_3.4-5           RPostgreSQL_0.6-2      DBI_1.1.1              sp_1.4-5              

loaded via a namespace (and not attached):
 [1] ggrepel_0.9.1      Rcpp_1.0.6         lattice_0.20-41    deldir_1.0-6       ps_1.6.0           class_7.3-18      
 [7] digest_0.6.27      utf8_1.2.2         ggforce_0.3.2      R6_2.5.1           plyr_1.8.6         evaluate_0.14     
[13] e1071_1.7-4        ggplot2_3.3.3      smoothr_0.1.2      pillar_1.7.0       nngeo_0.4.2        gdtools_0.2.2     
[19] rlang_1.0.0        uuid_0.1-4         rstudioapi_0.13    data.table_1.14.0  flextable_0.6.3    rmarkdown_2.11    
[25] stringr_1.4.0      htmlwidgets_1.5.2  polyclip_1.10-0    munsell_0.5.0      compiler_3.6.3     xfun_0.22         
[31] pkgconfig_2.0.3    systemfonts_1.0.1  base64enc_0.1-3    htmltools_0.5.1.1  tidyselect_1.1.0   gridExtra_2.3     
[37] tibble_3.1.6       codetools_0.2-18   matrixStats_0.58.0 fansi_1.0.2        withr_2.4.3        crayon_1.4.2      
[43] dplyr_1.0.2        sf_0.9-8           rappdirs_0.3.3     MASS_7.3-53.1      grid_3.6.3         jsonlite_1.7.3    
[49] lwgeom_0.2-5       gtable_0.3.0       lifecycle_1.0.1    magrittr_2.0.2     units_0.7-1        scales_1.1.1      
[55] KernSmooth_2.23-18 zip_2.1.1          cli_3.1.1          stringi_1.7.6      farver_2.1.0       reshape2_1.4.4    
[61] leaflet_2.0.3      xml2_1.3.2         ellipsis_0.3.2     generics_0.1.0     vctrs_0.3.8        tools_3.6.3       
[67] interp_1.0-33      glue_1.6.1         officer_0.3.18     tweenr_1.0.2       purrr_0.3.4        crosstalk_1.1.0.1 
[73] processx_3.5.2     colorspace_2.0-0   classInt_0.4-3     knitr_1.36         patchwork_1.1.1 
florisvdh commented 2 years ago

Hi, sorry for the late answer! Is this problem still present using current QGIS and qgisprocess?