Skip to main content

info_json

Function info_json 

Source
pub fn info_json(name: &Path) -> Result<Value>
Available on crate feature encoder only.
Expand description

The subset of gdalinfo -json that xuebuild actually reads, from the linked GDAL rather than the CLI.

xuebuild/gdal.py uses this to inspect GRIB and netCDF inputs without a system gdalinfo on PATH — a scheduled build converting through the native encoder then needs no system GDAL at all. Only the keys the Python side consumes are emitted; this is deliberately not a general reimplementation of gdalinfo, and the fields are pinned by tests/test_gdalinfo.py, which diffs them against the real CLI.

A dataset with no geotransform simply omits the key, the way gdalinfo does; the caller decides whether that is fatal.