Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connecting to OTB #18

Open
ailich opened this issue Nov 25, 2019 · 6 comments
Open

Connecting to OTB #18

ailich opened this issue Nov 25, 2019 · 6 comments

Comments

@ailich
Copy link

ailich commented Nov 25, 2019

The paper on RQGIS mentions the ability to connect with the Orfeo Toolbox. qgis_session_info() shows connections to qgis, gdal grass6, grass7, and saga, but not OTB. Is connecting to OTB currently supported?

@pat-s
Copy link
Member

pat-s commented Nov 25, 2019

IIRC OTB was removed from QGIS3?

@ailich
Copy link
Author

ailich commented Nov 26, 2019

@pat-s, it was removed initially, but as of QGIS 3.8, it was added back in. Currently my QGIS installation is located in "C:/OSGEO4W" folder, and the Orfeo toolbox is located in "C:\OTB-7.0.0-Win64."

@pat-s
Copy link
Member

pat-s commented Nov 26, 2019

Thanks for the heads up!

AFAIR we removed the support for OTB back then when it was removed. Should be an easy one to add it back in if nothing major has changed meanwhile.

@jannes-m?

@ailich
Copy link
Author

ailich commented Nov 26, 2019

@pat-s cool. Would the OTB folder need to "live" in a specific place and be named a certain way to be detected by RQGIS/RQGIS3?

@jannes-m
Copy link
Collaborator

jannes-m commented Nov 26, 2019

This would only work if OTB is part of the processing toolbox (as it was in QGIS 2) but I think I remember that they wanted to add other 3rd party providers as plugins. If this is the case I would rather refrain from adding an additional dependency since (R)QGIS3 is already hard to maintain. Instead I would simply use the command line interface of OTB which you could easily use via system() calls in R.
But you can test, if OTB algorithms are available (assuming that you also have installed OTB on your system) by running:

library("RQGIS3")
set_env()
algs = find_algorithms(name_only = TRUE)
# check if otb is among the 3rd party providers
unique(gsub(":.*", "", algs))

@ailich
Copy link
Author

ailich commented Nov 26, 2019

@jannes-m OTB does show up in the Processing Toolbox after following the instructions here (see image). However, it does not show up as a 3rd party provider for RQGIS3. It may be related to my setup though because I cannot get RQGIS to find it either even though it appears in the processing toolbar when QGIS2 is open.

Capture

library("RQGIS3")
set_env()
algs = find_algorithms(name_only = TRUE)
# check if otb is among the 3rd party providers
unique(gsub(":.*", "", algs))
[1] "gdal"   "grass7" "native" "qgis"   "saga"  

library("RQGIS")
set_env("C:/Program Files/QGIS 2.18")
algs = find_algorithms(name_only = TRUE)
# check if otb is among the 3rd party providers
unique(gsub(":.*", "", algs))
[1] "taudem"       "modelertools" "qgis"         "grass7"       "lidartools"   "saga"        
[7] "gdalogr"      "gdalorg"      "grass"  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants