linkOTB: Locate and set up 'Orfeo ToolBox' API bindings

View source: R/linkOTB.R

linkOTBR Documentation

Locate and set up 'Orfeo ToolBox' API bindings

Description

Locate and set up 'Orfeo ToolBox' API bindings

Usage

linkOTB(
  bin_OTB = NULL,
  root_OTB = NULL,
  type_OTB = NULL,
  searchLocation = NULL,
  ver_select = FALSE,
  quiet = TRUE,
  returnPaths = TRUE
)

Arguments

bin_OTB

string contains path to where the otb binaries are located

root_OTB

string provides the root folder of the bin_OTB

type_OTB

string

searchLocation

string hard drive letter (Windows) or mounting point (Linux) default for Windows is C:, default for Linux is ~

ver_select

boolean default is FALSE. If there is more than one 'OTB' installation and ver_select = TRUE the user can select interactively the preferred 'OTB' version In opposite if FALSE the newest version is automatically choosen.

quiet

boolean switch for supressing messages default is TRUE

returnPaths

boolean if set to FALSE the pathes of the selected version are written to the PATH variable only, otherwise all paths and versions of the installed GRASS versions ae returned.

Details

It looks for the otb_cli.bat file. If the file is found in a bin folder it is assumed to be a valid 'OTB' binary installation.

if called without any parameter linkOTB() it performs a full search over the hardrive C:. If it finds one or more 'OTB' binaries it will take the first hit. You have to set ver_select = TRUE for an interactive selection of the preferred version.

Value

add otb pathes to the enviroment and creates global variables path_OTB

Note

You may also set the path manually. Using a 'OSGeo4W64' https://trac.osgeo.org/osgeo4w/ installation it is typically C:/OSGeo4W64/bin/

Author(s)

Chris Reudenbach

Examples

## Not run: 
# call if you do not have any idea if and where OTB is installed
otb<-linkOTB()
if (otb$exist) {
# call it for a default OSGeo4W installation of the OTB
print(otb)
}

## End(Not run)

gisma/link2GI documentation built on April 23, 2024, 11:17 p.m.