Opened 13 years ago
Closed 13 years ago
#3922 closed defect (fixed)
Edge cases in NITFCreate don't conform to MIL-STD-2500-C
Reported by: | klaricmn | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.9.0 |
Component: | GDAL_Raster | Version: | svn-trunk |
Severity: | normal | Keywords: | nitf |
Cc: |
Description
I believe that I have found a few edge cases when the NITFCreate method does not conform to the NITF MIL-STD-2500-C standard. The cases that I'm describing can be found in paragraph 5.4.2.2-d (page 41 of the PDF file).
The existing code relevant to this paragraph was modified for #3263, but only handles two of the four cases. It handles the case when the block size is large (i.e. >8192) in both dimensions and when it has small block sizes in both dimensions. However, it does not currently account for the case when only one of the block dimensions exceeds 8192 even though the spec allows for it.
The attached patch addresses this issue.
Attachments (1)
Change History (3)
by , 13 years ago
Attachment: | nitf-big-block.patch added |
---|
comment:1 by , 13 years ago
Component: | default → GDAL_Raster |
---|---|
Milestone: | 1.8.0 |
comment:2 by , 13 years ago
Milestone: | → 1.9.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Yes those 2 cases were unadressed. I've modified a bit your patch since it didn't initialize the nNBPC or nNBPR variables.
r21542 /trunk/ (autotest/gdrivers/nitf.py gdal/frmts/nitf/nitffile.c): NITFCreate(): deal with cases where image_height = block_height > 8192 or image_width = block_width > 8192 (#3922)