Opened 17 years ago

Closed 17 years ago

#1714 closed defect (fixed)

Problem RPF NITF File - geotransform mixed up

Reported by: warmerdam Owned by: warmerdam
Priority: normal Milestone: 1.4.3
Component: GDAL_Raster Version: 1.4.0
Severity: normal Keywords: nitf
Cc: gaopeng

Description

File: http://download.osgeo.org/gdal/data/nitf/bugs/NITF21_CGM_ANNO_Uncompressed_unmasked.ntf

The IGEOLO information is ok, but GDAL uses the RPF geolocation information in preference and it seems to be mixed up about the proper offset to this info in the file.

The following debug messages indicate the NITF driver is doing some hackey stuff to try and correct for location table errors. Apparently it is not working well.

 NITF: Location table offsets off by 257 bytes, adjusting accordingly.
 NITF: Got spatial info from CoverageSection

This bug is related to the fix for ticket #1313.

Change History (2)

comment:1 by warmerdam, 17 years ago

The file is produced with GeoView, and is reported as corrupt by some other NITF validation programs (Mr.BIFF and SNIPER)

I see the file which lead to the hacky code for searching for the RPFHDR in #1313 was named similar to this problem file. I imagine it was produced by the same product. I think the solution is to stop the guesswork about the RPF header info location and just ignore it if it isn't where it should be. This would make the reader much more robust in the face of these files.

comment:2 by warmerdam, 17 years ago

Milestone: 1.5.01.4.3
Resolution: fixed
Status: newclosed
Version: svn-trunk1.4.0

I have changed the code to just ignore the location table in LoadLocationTable() if the RPFHDR object isn't where it should be according to the location table. This change has been incorporated into trunk, 1.4.x and 1.4-esri branches.

Note: See TracTickets for help on using tickets.