[gdal-dev] NITF file limitations
Frank Warmerdam
warmerdam at pobox.com
Fri Feb 20 15:40:46 EST 2009
Christiaan Janssen wrote:
> I was recently trying to open a NITF (jpeg blocked) file whose size was
> roughly 5GB using the stable 1.6 release and having quite a bit of
> trouble. Namely, I'm getting Access Violation Exception in the calls to
> CloseHandle. I dug around in the source a bit and noticed the code for
> the NITFdataset was referncing various file indexes that were stored in
> 32bit int's, this would obviously cause an issue for files of this size,
> maybe not specifically the issue I'm seeing but definitely with respect
> to raster data access. Does anyone know if this is a known issue and if
> so is there any way to work with this, or is this something thats
> needing to be addressed? Thanks.
Christian,
You are correct that the GDAL NITF driver was written based on the
assumption that NITF files are no larger than 4GB (the largest value
representable in a 32bit unsigned integer).
Reviewing the specification very briefly, I see that size values
are specified in a variety of ways, and for image data segment size
it is a 10 digit value which would in theory represent values up to
nearly 10GB.
The GDAL NITF driver could be upgraded to support large files but it
seems there are still significant issues inherent in the format with large
files.
I don't have any large files to test with, but if you are able to provide
your data file, and you are sufficiently motivated I could likely queue
up the task of adding "big file" support to the driver, at least for
reading.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the gdal-dev
mailing list