Available on crate feature
encoder only.Expand description
A thin safe wrapper over the handful of GDAL C entry points the encoder needs.
The Python encoder shells out to gdalinfo -json and gdal_translate -of ENVI -ot Float64; this reads the same numbers in process, which is the
whole point of the experiment — a production GFS run wrote and re-read
several gigabytes of intermediate ENVI files per build.
Only gdal-sys (georust’s GDAL FFI crate) is used, not the high-level
gdal crate: as of gdal 0.19 the safe wrapper does not compile against
GDAL 3.13, whose GDALDataType and GDALRasterIOExtraArg changed shape.
The surface used here is a dozen stable C functions, so binding them
directly costs less than pinning an older GDAL.
Structs§
- Band
Info - One band’s default-domain metadata plus its description, the two things
gdalinfo -jsonreports that record matching reads. - Dataset
- An open GDAL dataset. Not
Sync: GDAL dataset handles must not be shared between threads, so each worker opens its own.
Functions§
- info_
json - The subset of
gdalinfo -jsonthatxuebuildactually reads, from the linked GDAL rather than the CLI. - needs_
serial_ access - Whether a GDAL connection string names a dataset that must be read under
netcdf_guard. NetCDF subdatasets are spelledNETCDF:"<file>":<var>. - netcdf_
guard - Hold this for as long as a netCDF dataset is open and being read.