searchGDALX: Search recursively for valid GDAL installation(s) on...

View source: R/gdalControls.R

searchGDALXR Documentation

Search recursively for valid GDAL installation(s) on Linux/macOS

Description

Searches for an executable 'gdalinfo' and returns a normalized installations table plus best-effort lists of GDAL binaries ('gdal*') and python tools ('*.py') found alongside the detected 'gdalinfo'.

Usage

searchGDALX(MP = "default", quiet = TRUE)

Arguments

MP

Character. Search root. '"default"' expands to 'c("~","/opt","/usr/local","/usr")'. You may also pass a single directory (e.g. '"/usr"').

quiet

Logical. If 'TRUE', suppress messages.

Details

This implementation is portable: it does NOT use GNU-only 'find' primaries such as '-readable', and it uses 'system2(..., args=...)' with proper token separation (no shell parsing assumptions).

Value

A list with:

gdalInstallations

data.frame with columns 'binDir', 'baseDir', 'installation_type'.

bin

list of data.frames (column 'gdal_bin') with detected GDAL binaries per installation.

py

list of data.frames (column 'gdal_py') with detected GDAL python tools per installation.

Examples

## Not run: 
x <- searchGDALX()
x$gdalInstallations

## End(Not run)

link2GI documentation built on Dec. 23, 2025, 9:09 a.m.