dicogis.utils.environment module¶
Helpers to retrieve information from execution environment like software versions.
- dicogis.utils.environment.get_available_gdal_drivers()¶
List the short names of every GDAL/OGR driver registered in the currently installed GDAL.
Since GDAL 2.0, raster and vector drivers share a single driver manager, so gdal.GetDriverCount()/gdal.GetDriver() cover both (unlike ogr.GetDriverCount(), which only reflects a legacy subset).
- dicogis.utils.environment.get_gdal_version()¶
Return GDAL version from gdal-config cmd or from environment variable GDAL_VERSION.
- Returns:
version of GDAL
- Return type:
- dicogis.utils.environment.get_proj_version()¶
- Get PROJ version, using GDAL, PyProj, installed proj binaries or environment
variable.
- Returns:
PROJ’s version as Major.Minor.Micro or None if not found
- Return type:
str | None
- dicogis.utils.environment.is_format_supported_by_gdal(format_name, available_drivers=None)¶
Check whether the installed GDAL can actually read a given supported format (see dicogis.constants.FORMAT_TO_GDAL_DRIVERS).
- Parameters:
- Return type:
- Returns:
True if format_name is unknown (nothing to gate on) or at least one of its required drivers is registered, False otherwise.