Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#2912 closed defect (fixed)

Reposition all NITF image and annotation segments relative to the base (0) segment

Reported by: gaopeng Owned by: warmerdam
Priority: normal Milestone: 1.6.1
Component: GDAL_Raster Version: 1.6.0
Severity: normal Keywords: NITF


NITF image and annotation segments can have an offset relative to any segment in the file. Reposition all segments relative to the base segment will make it much easier for application to position the segments.

A sample image is at

Change History (5)

comment:1 by gaopeng, 15 years ago

Another sample image, u_3054a.ntf, is at It's a simpler test case.

The sample image, sample2.ntf, has another issue where the image seg 0 has a SR but other image segments have none.

comment:2 by gaopeng, 14 years ago

The sample image, sample2.ntf, shows a different issue. This image contains multiple image segments. The image seg 0 has a SR and georeferencing, but other image segments have none. As teh result, these image segments don't register.

An alternative solution to attaching SR and georeferencing for all image segments is to remove it from all of them.

comment:3 by warmerdam, 14 years ago

Keywords: NITF added
Status: newassigned

I have reviewed the example files, and the specification and can confirm the following points:

  • The ROW/COLUMN locations for graphics and images are relative to the image/graphic to which the object is attached, not the base level common coordinate system (CCS).
  • Graphic objects have no information about display level or the object to which they are attached, so it is impossible to accurately evaluate the location information.
  • No positioning information relative to CCS is returned in metadata for unattached objects (like base images), making it impossible to accurately place unattached objects relative to one another.

I am contemplating the following changes:

  • Convert all Row/Column location information for images and graphic segments to CCS.
  • Report display level metadata on images that were lacking it (unattached images).
  • Add attachment and display level items for graphic segments.

I shall proceed to try and prototype this change.

I do not think the issues about georeferencing are directly related to the core issue of this ticket, and I would suggest they be filed as a distinct ticket.

comment:4 by warmerdam, 14 years ago

Resolution: fixed
Status: assignedclosed

The suggested changes have been applied in trunk (r16863) and 1.6 branch (r16864). As well some tests were added in trunk (r16862). The coordinates in the common coordinate system were prefixed with CCS so now for CGM data we have something like:


Similarly for image metadata.

comment:5 by gaopeng, 14 years ago

My initial testing confirms that the issue is resolved. More testing will be done.

Note: See TracTickets for help on using tickets.