You are here: NITF Images > Creating and Using Multiple Image Segment NITF Files

Creating and Using Multiple Image Segment NITF* Files

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

*Support for encoding NITF images is available for GeoExpress. Contact your LizardTech representative to purchase the NITF Extension for GeoExpress.

Specifying Image Segments to Encode

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

Switches for Specifying Image Segments
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.

Example:

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

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

-iseg 1,4,5

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.

Switches for Creating RGB Color Composites
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.

Switches for Creating Multiband Color Composites
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.

Switches for Creating Mosaics with Multiband Files
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:

foo1.ntf,1,2

foo2.tif

foo3.ntf,3

foo4.ntf

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 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.