nitf-rs

A rust NITF file interface

Current project goals are - Finish implementing version 2.1 reading (maybe writing) - Verify header/subheader field entries (see NitfField) - Implement logic for various header/subheader inputs - For example, return data from an image segment as an array with the appropriate format (right now only two-channel complex float supported supported) - Expand with features for various applications of the standard (SICD as a first step)

Example

```rust use nitfrs::nitf::readnitf; use std::path::Path; // Define a string which is the path to some nitf file let nitffile: String = getnitffile(); let nitfpath = Path::new(&nitf_file);

// Read the file and print all metadata let nitf = readnitf(nitfpath); println!("{}", &nitf);

// Read image data from a segment, check that the dimensions are what we expect let imseg = &nitf.imagesegments[0]; let data = imseg.datatoarray(); println!("Meta NROWS: {}, data.nrows(): {}", imseg.meta.nrows.val, data.nrows()); println!("Meta NCOLS: {}, data.ncols(): {}", im_seg.meta.nrows.val, data.ncols());

// If you have a SICD file, parse and print the metadata use nitfrs::sicd::readsicd; let sicdmeta = readsicd(nitfpath); println!("{:#?}", sicdmeta); ```

Current Functionality

In my own testing, I have only been able to find files to verify parsing for: - Header - Image Segments - Data Extension Segments - Sicd xml metadata parsing

To the best of my knowledge, these function as expected.

There is no logic built around the inputs yet (in progress)

If you have questions, would like to contribute, or would like to request something be added, you can ask on this Discord server, or create an issue.