-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open big tif file with C++ API got some error #2165
Comments
I'm not sure why you get it working in Python. Presumably because you don't use the same GDAL version as in C++, and such version being an older version that didn't use some recent optimizations. I get errors with GDAL master both in C++ and Python, which is consistent. The error comes from the fact that this file is non conformant with the BigTIFF specification.
whereas acoording to https://www.awaresystems.be/imaging/tiff/bigtiff.html only unsigned types (LONG8, LONG, SHORT) are allowed for that tag.
|
…NG8 data type Such as in OSGeo/gdal#2165
With Python API, I use Conda create a separate environment with python 3.7 and nothing else but gdal3.0.2 and its dependencies, It successed reading that TIF, I could list all the package I have in that virtual environment:
As for my original problem, I'll just try use an older version of GDAL. |
#1627 Expected behavior and actual behavior.
I expected to open this TIF file and using RasterIO method to read it into memory,
file links:
https://drive.google.com/open?id=1ndGyRuOXMGLb6vjFzfLNTbsfS5Rxmx2c
the code sample I use is from GDAL tutorial, like this:
I compile this program,nothing wrong, then run it, nothing wrong until the RAsterIO method began to work, and it gives me error list below:
I then try some other IMG file like some smaller JPG file, all is good and no error.
In the same time, I am using GDAL python API, then I use Python Open this TIF file and use ReadRaster method with same parameters, it works, the tif file is correctly read into memory and output right,
data output:
b'\xe6\x02\xce\x02\xc7\x02\x8e\x02B\x02\xfc\x01\x12\x02\xf5\x01\xd2\x01\xc3\x01\x04\x02\xfc\x01\xc9\x01\x90\x02\xf9\x02\xe4\x02p\x02\x1b\x02\xe8\x01\x02\x02\x00\x0...
I began to suspect if it is some dependencies I forget to set when I build gdal for C++, when I install GDAL with Conda,it tells me there are more packages needs to installed, which is:
And when I build GDAL for visual studio, I just build GDAL, SQlite and Proj,I don't know which exact package cause the different result in two API, hope you guys could answer my question.
Operating system
Microsoft Windows10.0 17763 64bit
visual studio 2019 community version
GDAL version and provenance
GDAL C++ API version 3.0.2 with sqlite3 and proj6.2.1
GDAL python API version 3.0.2, other dependencies is mention above
The text was updated successfully, but these errors were encountered: