-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
What is the bug?
I have a ~33GB ENVI file, with dimensions 4,360,048,129 x 2 (hdr attached). gdalinfo gives the following output
Files: large_file
large_file.hdr
Size is 2, 65080833
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0,65080833.0)
Upper Right ( 2.0, 0.0)
Lower Right ( 2.0,65080833.0)
Center ( 1.0,32540416.5)
As you can see, GDAL seems to be able to read only 65,080,833 elements.
Is this a known/intended limitation of the format, or it is a GDAL bug? In the event of an intended limitation, I think that it should be mentioned in the docs.
I have seen that writing such a large file is also a problem with Python, since GDAL expects an int as rows
argument (attached a Python script to generate such a large file, which gives the error OverflowError: in method 'Driver_Create', argument 4 of type 'int'
).
Steps to reproduce the issue
You can use the IDL script attached to generate the sample data.
Versions and provenance
OS Version:
Red Hat Enterprise Linux 8.6
Output of gdalinfo --version
GDAL 3.11.3 "Eganville", released 2025/07/12
GDAL installed from conda-forge.
Additional context
No response