-
Notifications
You must be signed in to change notification settings - Fork 183
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
Problem loading bigTIFF larger than 2^32 bytes #68
Comments
Hi @sroboubi What is strange, is that obviously some indices are actually read correctly. |
I do have the test data. How can I send it? Google drive/dropbox or do you have a better method? |
@sroboubi Yes, a link to the file would be ideal! |
@constantinius Getting 416 (Range Not Satisfiable): Requested Range: bytes=-1145289660--1145224125 Getting RangeError: Offset is outside the bounds of the DataView Let me know if you have any issues downloading them. Thanks. |
@sroboubi Second (and here is the real issue): the current method to read 64bit integers is inherently flawed, as JavaScript only deals with 64 bit float values and treating them as integers simply does not cut it. I'll open a branch for the |
How can I get and test this fix? I typically just use "npm i geotiff" to get the latest from master. I tried manually downloading the branched code from https://github.com/geotiffjs/geotiff.js/tree/bigtiff-bigint and building using "npm run build" but that didn't generate a dist folder. Thanks. |
@sroboubi hm, that is odd, when I try to run |
@sroboubi Additionally, you can use the It works like this:
Now you should have linked the repository as your geotiff package source |
@constantinius Note that I updated the package.json to remove NODE_ENV=production from the "bundle:prod" script. This only produced geotiff.bundle.min.js, but not geotiff.browserify.js. Using the minified code I managed to load normal geotiffs but when loading a bigtiff the browser would hang (after making 3 successful partial GET requests) and I can't debug this because I only have the minified code. |
@constantinius |
We've run into issues loading bigTIFF files that are larger than 2^32 bytes. The issue happens regardless of compression but results in different types of errors. For DEFLATE data we get a 406 HTTP error because the library is requesting an invalid (negative) range. For uncompressed data we get:
RangeError: Offset is outside the bounds of the DataView
or
RangeError: Invalid field type: 615
These might all have the same root cause, which might be related to how 64 bit addresses are handled as 2 x 32 bit values. Do you have any bigTIFF test data that is larger than 2^32 bytes that you can use to reproduce the problem? If not, is there a good way we could send you our test data?
Thanks.
The text was updated successfully, but these errors were encountered: