pub struct BlobInfo {Show 16 fields
pub version: Version,
pub data_type: DataType,
pub width: u32,
pub height: u32,
pub depth: u32,
pub min_values: Option<Vec<f64>>,
pub max_values: Option<Vec<f64>>,
pub valid_pixel_count: u32,
pub micro_block_size: u32,
pub blob_size: usize,
pub remaining_band_count: u32,
pub max_z_error: f64,
pub z_min: f64,
pub z_max: f64,
pub mask_encoding: MaskEncoding,
pub no_data_value: Option<f64>,
}Expand description
Validated metadata for one LERC blob.
Fields§
§version: VersionFormat family and version.
data_type: DataTypeNumeric representation stored by the blob.
width: u32Raster width in pixels.
height: u32Raster height in pixels.
depth: u32Samples per pixel.
min_values: Option<Vec<f64>>Optional per-depth minima when the format carries them.
max_values: Option<Vec<f64>>Optional per-depth maxima when the format carries them.
valid_pixel_count: u32Number of pixels marked valid.
micro_block_size: u32Encoded square micro-block size, or zero for Lerc1.
blob_size: usizeExact encoded length of this blob in bytes.
remaining_band_count: u32Number of appended bands declared by a Lerc2 v6 header, or zero otherwise.
max_z_error: f64Maximum absolute reconstruction error declared by the blob.
z_min: f64Minimum encoded valid sample value.
z_max: f64Maximum encoded valid sample value.
mask_encoding: MaskEncodingValidity-mask representation.
no_data_value: Option<f64>Original no-data sentinel when Lerc2 v6 carries one.
Implementations§
Source§impl BlobInfo
impl BlobInfo
Sourcepub fn pixel_count(&self) -> Result<usize>
pub fn pixel_count(&self) -> Result<usize>
Returns width * height using checked arithmetic.
Sourcepub fn sample_count(&self) -> Result<usize>
pub fn sample_count(&self) -> Result<usize>
Returns width * height * depth using checked arithmetic.
Sourcepub fn mask_count(&self) -> u32
pub fn mask_count(&self) -> u32
Returns the number of logical masks represented by this blob.
Sourcepub fn uses_external_mask(&self) -> bool
pub fn uses_external_mask(&self) -> bool
Returns whether the blob requires an externally supplied mask.
Sourcepub fn uses_no_data_value(&self) -> bool
pub fn uses_no_data_value(&self) -> bool
Returns whether the blob carries an active no-data sentinel.
Sourcepub fn raster_shape(&self) -> Vec<usize>
pub fn raster_shape(&self) -> Vec<usize>
Returns the natural row-major raster shape.
Sourcepub fn mask_shape(&self) -> Vec<usize>
pub fn mask_shape(&self) -> Vec<usize>
Returns the row-major mask shape [height, width].
Sourcepub fn ndarray_shape(&self) -> Vec<usize>
pub fn ndarray_shape(&self) -> Vec<usize>
Alias for Self::raster_shape used by ndarray integrations.
Sourcepub fn mask_ndarray_shape(&self) -> Vec<usize>
pub fn mask_ndarray_shape(&self) -> Vec<usize>
Alias for Self::mask_shape used by ndarray integrations.