Module gdal::config[][src]

Expand description

GDAL Configuration Functions

The GDAL library can be configured at runtime using environment variables or by using functions in this module. Options set by calling functions in this module override options set in environment variables.

use gdal::config::*;

// Increase GDAL's cache size to 1024Mb
set_config_option("GDAL_CACHEMAX", "1024").unwrap();

// Get the size of GDAL's cache
assert_eq!(get_config_option("GDAL_CACHEMAX", "").unwrap(), "1024");

// Set the cache size back to default
clear_config_option("GDAL_CACHEMAX").unwrap();

// Check the option has been cleared
assert_eq!(get_config_option("GDAL_CACHEMAX", "XXX").unwrap(), "XXX");

Refer to GDAL ConfigOptions for a full list of options.

Functions

Clear the value of a GDAL library configuration option

Clear the value of a GDAL library configuration option with thread local scope

Get the value of a GDAL library configuration option

Get the value of a GDAL library configuration option with thread local scope

Remove a custom error handler for GDAL.

Set a GDAL library configuration option

Set a custom error handler for GDAL. Could be overwritten by setting a thread-local error handler.

Set a GDAL library configuration option with thread local scope