Module gdal::version

source ·
Expand description

GDAL Version Inspection Utilities

Example

Get the same string provided by using --version with the various GDAL CLI tools, use VersionInfo::version_summary:

use gdal::version::VersionInfo;
let gdal_ver = VersionInfo::version_summary();
println!("{gdal_ver}")
GDAL 3.5.1, released 2022/06/30

For all the available version properties (except VersionInfo::license, which is long), use VersionInfo::version_report:

let report = VersionInfo::version_report();
println!("{report}");
GDALVersionInfo {
    RELEASE_NAME: "3.5.1"
    RELEASE_DATE: "20220630"
    VERSION_NUM: "3050100"
    BUILD_INFO {
        PAM_ENABLED: "YES"
        PROJ_BUILD_VERSION: "9.0.1"
        OGR_ENABLED: "YES"
        PROJ_RUNTIME_VERSION: "9.0.1"
        GEOS_ENABLED: "YES"
        GEOS_VERSION: "3.11.0-CAPI-1.17.0"
    }
}

See VersionInfo for further options.

Structs

  • Convenience functions for the various pre-defined queryable properties of GDAL version information.

Functions

  • Calls GDALVersionInfo, expecting key as one of the following values: