stackstac.rio_env.LayeredEnv#

class stackstac.rio_env.LayeredEnv(always, open=None, open_vrt=None, read=None)#

Manage GDAL configuration options for different situations (always, opening, reading).

Access the rasterio.Env for each situation with layered_env.always, layered_env.read, etc. To ensure thread-safety, each thread accessing these properties gets its own thread-local copy of a rasterio.Env.

Options are layered as follows:

  • always: the base set of options

  • open: always + open

  • open_vrt: open + open_vrt

  • read: always + read

__init__(always, open=None, open_vrt=None, read=None)#

Methods

__init__(always[, open, open_vrt, read])

updated([always, open, open_vrt, read])

Duplicate this LayeredEnv, adding additional options for each situation.

Attributes

always

Base rasterio.Env object

open

rasterio.Env object to use while opening datasets

open_vrt

rasterio.Env object to use while opening VRTs

read

rasterio.Env object to use while reading from datasets