read_sicd

Function read_sicd 

Source
pub fn read_sicd(path: &Path) -> Result<Sicd<'_>, SicdError>
Expand description

Construct a Sicd object from a file path.

This is specifically for cases where the version of the Sicd is not known and makes use of several enums to parse the data.

ยงExample

use std::path::Path;
use sicd_rs::SicdVersion;

let sicd_path = Path::new("../example.nitf");
let sicd = sicd_rs::read_sicd(sicd_path).unwrap();
// Then use convenience methods provided by SicdMeta enum, or match off of version
let meta = sicd.meta.get_v1_meta();