You are here: NITF Images > Multiple image segment NITF files

Multiple image segment NITF files

The following new switches support reading and writing NITF files with multiple image segments.

Specifying image segments to encode

To specify which image segments of a multi-segment input file to encode, use the ‑iseg switch.

Switch Value Notes
‑imagesegments / ‑iseg string Used in conjunction with the ‑input switch to identify which image segments to use if the input image supports multiple image segments.

Segments are numbered starting from 1 and specified by a comma delimited list with no spaces. For example:

-iseg 1,4,5

mrsidgeoencoder -i foo.ntf -iseg 1 -o foo.sid -of mg3

Image segments and color composite images

RGB color composites

When creating an RGB color composite image, image segments from multisegment files can be specified with the ‑redseg, ‑greenseg, and ‑blueseg switches.

Switch Value Notes
‑redseg uint Used in conjunction with the ‑redband switch to identify which image segment of a multisegment input image to use
‑reproerror float

Specifies the desired error fraction for a reprojection operation.

Acceptable values: 0.0–1.0.

Default: 0.125.

‑greenseg uint Used in conjunction with the ‑greenband switch to identify which image segment of a multisegment input image to use
-blueseg uint Used in conjunction with the -blueband switch to identify which image segment of a multisegment input image to use

Multibanded color composites

To use multi-segment image files as input for multibanded color composite files, use the ‑ccmpseg switch.

Switch Value Notes
‑colorcompseg / ‑ccmpseg string Used in conjunction with the ‑colorcomp switch to identify which image segments to use if the input images support multiple image segments. Segments are numbered 1 through n and specified by a comma-delimited list with no spaces.

Requirements for the ‑ccmpseg switch:

For example, a color composite file with six input files could have the following segment values:

-colorcompseg 1,2,3,0,0,1

Creating mosaics that include multiple image segment files

To create a mosaic that includes multisegment input files, use the -msmos switch and supply a specially formatted text file as the input file.

Switch Notes
‑msmosaic / ‑msmos Identifies the input file as a text file of mosaic images with comma delimited image segment identifiers. Each line of the text file must contain the input file name, followed by a comma and then a comma delimited list of the active image segments.

Supplying just the file name will use all image segments. A sample file may look like this:

All of the input files must be mosaickable, as per the standard GeoExpress mosaicking rules (see Creating a mosaic).

Known limitation on making multisegment NITF files from the command line

Using the classic ‑mos AUX file method, a multisegment NITF can be generated using the ‑ms switch. However, using this mechanism it is only possible to set the image subheader metadata for the first segment. To set unique image subheader metadata for each image segment, use either the ‑cmos or ‑msmos text file formats.

Multisegment NITF files require world files. For more information see Creating world files and World files.