aws.osml.gdal.gdal_config module
- aws.osml.gdal.gdal_config.set_gdal_default_configuration() None [source]
This function sets GDAL configuration options to support efficient reading of large raster datasets using the /vsis3 virtual file system.
- Returns:
None
- class aws.osml.gdal.gdal_config.GDALConfigEnv(options: Dict | None = None)[source]
Bases:
object
This class provides a way to setup a temporary GDAL environment using Python’s “with” statement. GDAL configuration options will be set inside the scope of the with statement and then reverted to previously set values on exit. This will commonly be used to set AWS security credentials (e.g. AWS_SECRET_ACCESS_KEY) for use by other GDAL operations.
See: https://gdal.org/user/configoptions.html#gdal-configuration-file for additional options.
- with_aws_credentials(aws_credentials: Dict[str, str] | None) GDALConfigEnv [source]
This method sets the GDAL configuration options for the AWS credentials from the credentials object returned by a boto3 call to sts.assume_role(…).
- Parameters:
aws_credentials – the dictionary of values from the sts.assume_role() response[‘Credentials’]
- Returns:
self to facilitate a simple builder constructor pattern