You are here: NITF Support > NITF Input Metadata

## NITF Input Metadata

NOTE: The following discussion assumes familiarity with the NITF specification.

When reading a NITF file, the SDK stores many NITF fields as metadata, for example as tag/value pairs in MrSID imagery (see "Metadata Tags").

In general, the tag name is of the form

`NITF::xxnnn::field`

where `xx` is a two letter code representing the NITF segment (`IM` for image, `FH` for file header) and `nnn` is the NITF segment number. TRE fields contain the prefix "`TRE_`". Specifically, the SDK stores input fields in metadata tags as described in the following tables.

###### File Header Fields

The SDK stores file header fields in the following tags:

File Header Fields
NITF Field | GeoExpress Tag
--- | ---
FHDR | NITF::FH000::FHDR
FVER | NITF::FH000::FVER
STYPE | NITF::FH000::STYPE
OSTAID | NITF::FH000::OSTAID
FDT | NITF::FH000::FDT
FTITLE | NITF::FH000::FTITLE
ONAME | NITF::FH000::ONAME
OPHONE | NITF::FH000::OPHONE
NUMI | NITF::FH000::NUMI
NUMS | NITF::FH000::NUMS
NUML | NITF::FH000::NUML
NUMT | NITF::FH000::NUMT
NUMDES | NITF::FH000::NUMDES
NUMRES | NITF::FH000::NUMRES

Of the above, the SDK allows the user to set the values for `OSTAID`, `FDT`,`FTITLE`, `ONAME`, and `OPHONE` when encoding NITF images.

###### Security-Related Fields

The SDK stores security-related fields from the file header (unless they are blanks) in the following tags:

Security-Related Fields
NITF Field | GeoExpress Tag
--- | ---
SCLAS | NITF::FH000::SCLAS
SCLSY | NITF::FH000::SCLSY
SCODE | NITF::FH000::SCODE
SCTLH | NITF::FH000::SCTLH
SREL | NITF::FH000::SREL
SDCTP | NITF::FH000::SDCTP
SDCDT | NITF::FH000::SDCDT
SDCXM | NITF::FH000::SDCXM
SDG | NITF::FH000::SDG
SDGDT | NITF::FH000::SDGDT
SCLTX | NITF::FH000::SCLTX
SCATP | NITF::FH000::SCATP
SCAUT | NITF::FH000::SCAUT
SCRSN | NITF::FH000::SCRSN
SSRDT | NITF::FH000::SSRDT
SCTLN | NITF::FH000::SCTLN

The SDK allows the user to custom set all of the above.

###### Image Segment Fields

The SDK stores image segment fields in the following tags:

Image Segment Fields
NITF Field | GeoExpress Tag
--- | ---
IID1 | NITF::IM001::IID1
IDATIM | NITF::IM001::IDATIM
TGTID | NITF::IM001::TGTID
IID2 | NITF::IM001::IID2
ISORCE | NITF::IM001::ISORCE
ICORDS | NITF::IM001::ICORDS
IGEOLO | NITF::IM001::IGEOLO
NICOM | NITF::IM001::NICOM
ICOM1 | NITF::IM001::ICOM1
... | ...
ICOM9 | NITF::IM001::ICOM9

The SDK allows the user to custom set these image segment fields: `IID1`, `IDATIM`, `TGTID`, `IID2`, `ISORCE`, `NICOM`, `ICOM1...ICOM9`.

###### Additional Notes

In addition, the SDK does the following:

- handles the security fields in the Image Segment as they are handled in the file header
- stores all detected TREs in metadata as binary data. For example, USE00A data would be stored as an array of bytes using the following tag:

  NITF::IM001::TRE_USE00A

- explicitly recognizes the following TREs when reading in a NITF file:

  J2KLRA, USE00A, STDIDC, PIAIMC, RPC00A/B

  For these TREs, additional metadata entries are created corresponding to each of their constituent fields. For example, PIAIMC data is represented as follows:

  NITF::IM001::TRE_PIAIMC_CLOUDCVR

  NITF::IM001::TRE_PIAIMC_SRP

  NITF::IM001::TRE_PIAIMC_SENSMODE

  NITF::IM001::TRE_PIAIMC_SENSNAME

  ...