#1427 closed defect (worksforme)
NITF driver reading from incorrect file offsets
Reported by: | Owned by: | warmerdam | |
---|---|---|---|
Priority: | normal | Milestone: | 1.4.2 |
Component: | GDAL_Raster | Version: | 1.4.0 |
Severity: | major | Keywords: | |
Cc: |
Description (last modified by )
I'm reporting a bug in the NITF driver. The 2007-01-07 snapshot of nitfmage.c, line 596 needs to be removed.
As can be seen in this snippet, the nOffset += 20 causes the NITFImageAccess function to be 20 bytes off from this point. the nIDLVL field should be 2 bytes after NBPP.
psImage->nBitsPerSample = atoi(NITFGetField(szTemp, pachHeader, nOffset+18, 2)); nOffset += 20; if( psImage->nABPP == 0 ) psImage->nABPP = psImage->nBitsPerSample; psImage->nIDLVL = atoi(NITFGetField(szTemp,pachHeader, nOffset+20, 3));
Attachments (1)
Change History (6)
by , 17 years ago
comment:1 by , 17 years ago
Dan, I think the nOffset += 20 line is ok, but that the IDLVL and related fields need to have that offset taken into account. I have committed a fix for this, and now IDLVL seems to be working again. Note this fix is not in 1.4.0, but will appear in 1.4.1 when released. I would like to hold the 2.0/2.1 creation option code till after the GDAL 1.4.x branch has been split off as I'm not comfortable including that in the stable branch.
comment:2 by , 17 years ago
Yup, i saw today removing the line wouldn't fix the problem, it either had to be moved after LDLVL or offsets re-done. I'll resync to the latest GDAL NITF snapshot, re-apply my changes and continue my testing. My NITF update has a lot of changes so I understand the need to withhold merging the code in. I'll give the code a couple once-overs this week and if i find any glaring errors, I'll submit them to this thread.
comment:4 by , 17 years ago
Description: | modified (diff) |
---|---|
Milestone: | → 1.4.2 |
Priority: | highest → normal |
Severity: | normal → major |
Dan,
Did you ever get a chance to retest this?
I'd like to close this report if the issue is gone.
comment:5 by , 17 years ago
Resolution: | → worksforme |
---|---|
Status: | assigned → closed |
Closing for now, feel free to reopen this Dan if you believe the problem still exists.
comment:6 by , 17 years ago
Frank,
Missed your early message, will double check the fix this week...
-- dan
Note:
See TracTickets
for help on using tickets.
Updates to NITF driver