rasterio._env module
GDAL and OGR driver and configuration management
The main thread always utilizes CPLSetConfigOption. Child threads utilize CPLSetThreadLocalConfigOption instead. All threads use CPLGetConfigOption and not CPLGetThreadLocalConfigOption, thus child threads will inherit config options from the main thread unless the option is set to a new value inside the thread.
- class rasterio._env.ConfigEnv
Bases:
object
Configuration option management
- clear_config_options()
Clear GDAL config options.
- get_config_options()
- options
- update_config_options(**kwargs)
Update GDAL config options.
- class rasterio._env.GDALDataFinder
Bases:
object
Finds GDAL data files
Note: this is not part of the public API in 1.0.x.
- find_file(basename)
Returns path of a GDAL data file or None
- search(prefix=None)
Returns GDAL data directory
Note well that os.environ is not consulted.
- Return type:
str or None
- search_debian(prefix='/home/docs/checkouts/readthedocs.org/user_builds/rasterio/conda/stable')
Check Debian locations
- search_prefix(prefix='/home/docs/checkouts/readthedocs.org/user_builds/rasterio/conda/stable')
Check sys.prefix location
- search_wheel(prefix=None)
Check wheel location
- class rasterio._env.GDALEnv
Bases:
ConfigEnv
Configuration and driver management
- drivers()
- start()
- stop()
- class rasterio._env.PROJDataFinder
Bases:
object
Finds PROJ data files
Note: this is not part of the public API in 1.0.x.
- search(prefix=None)
Returns PROJ data directory
Note well that os.environ is not consulted.
- Return type:
str or None
- search_prefix(prefix='/home/docs/checkouts/readthedocs.org/user_builds/rasterio/conda/stable')
Check sys.prefix location
- search_wheel(prefix=None)
Check wheel location
- rasterio._env.catch_errors()
Intercept GDAL errors
- rasterio._env.del_gdal_config(key)
Delete a GDAL configuration option.
- Parameters:
key (str) – Name of config option.
- rasterio._env.driver_count()
Return the count of all drivers
- rasterio._env.get_gdal_config(key, normalize=True)
Get the value of a GDAL configuration option. When requesting
GDAL_CACHEMAX
the value is returned unaltered.
- rasterio._env.set_gdal_config(key, val, normalize=True)
Set a GDAL configuration option’s value.
- rasterio._env.set_proj_data_search_path(path)
Set PROJ data search path.