# NITF -- National Imagery Transmission Format

GDAL supports reading of several subtypes of NITF image files, and writing simple uncompressed NITF 2.1 files. NITF 1.1, NITF 2.0, NITF 2.1 and NSIF 1.0 files with uncompressed, jpeg compressed, jpeg2000 (with Kakadu or ECW SDKs) or VQ compressed images should be readable. Other compression mechanisms are not supported at this time. The read support test has been tested on CIB and CADRG RPF products.

Color tables for pseudocolored images are read. In some cases nodata values may be identified. In theory all input pixel types except 1bit are supported, but only 8bit and 16bit types have actually been tested.

Lat/Long extents are read from the IGEOLO information in the image header if available. If high precision lat/long georeferencing information is available in RPF auxilary data it will be used in preference to the low precision IGEOLO information. In case a BLOCKA instance is found, the higher precision coordinates of BLOCKA are used if the block data covers the complete image - that is the L_LINES field with the row count for that block is equal to the row count of the image. Additionally, all BLOCKA instances are returned as metadata.

Most file header and image header fields are returned as dataset level metadata.

## Creation Issues

On export NITF files are always written as NITF 2.1 with one uncompressed image and no other auxilary layers. Georeferencing can only be written for images using a geographic coordinate system. Coordinates are implicitly treated as WGS84 even if they are actually in a different geographic coordinate system. Pseudo-color tables may be written for 8bit images.

In addition to the export oriented CreateCopy() API, it is also possible to create a blank NITF file using Create() and write imagery on demand. However, using this methology writing of pseudocolor tables and georeferencing is not supported unless appropriate IREP and ICORDS creation options are supplied.

Creation Options:

- Most file header, and imagery header metadata and security fields can be set with appropriate creation options. For instance setting `"FTITLE=Image of abandoned missle silo south west of Karsk"` in the creation option list would result in setting of the FTITLE field in the NITF file header. Use the official field names from the NITF specification document.

- ICORDS: Set to "G" to ensure that space will be reserved for geographic corner coordinates to be set later via SetGeoTransform(). (Only needed for Create() method, not CopyCreate()).

- FHDR: File version can be selected though currently the only two variations supported are "NITF02.10" (the default), and "NSIF01.00".

- IREP: Set to "RGB/LUT" to reserve space for a color table for each output band. (Only needed for Create() method, not CopyCreate()).

- LUT_SIZE: Set to control the size of pseudocolor tables for RGB/LUT bands. A value of 256 assumed if not present. (Only needed for Create() method, not CopyCreate()).

- TFW=YES: Force the generation of an associated ESRI world file (.tfw).

- BLOCKXSIZE=n: Set the block width.

- BLOCKYSIZE=n: Set the block height.

- BLOCKA_*=: If a complete set of BLOCKA options is provided with exactly the same organization as the NITF_BLOCKA metadata reported when reading an NITF file with BLOCKA TREs then a file will be created with BLOCKA TREs.

## Credit

The author wishes to thank AUG Signals and the GeoConnections program for supporting development of this driver, and to thank Steve Rawlinson (JPEG), Reiner Beck (BLOCKA) for assistance adding features.

See Also:

- Advanced GDAL NITF Driver Information
- NITFS Technical Board Public Page
- The OGDI driver supports many NITF based RPF products including CIB and CADRG.

- The RPFTOC driver is an alternative to the OGDI driver for CIB and CADRG products.