-
Notifications
You must be signed in to change notification settings - Fork 184
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
Retrieving data with fromUrl gets wrong data from Alibaba OSS #196
Comments
Is this issue now fixed with the PR by @aloisklink (#198)? This issue was automatically closed, so if you still have this problem, please reopen the issue |
Hi all, posting this here in case any body else is having the same issue, and wants the work around. I'm getting a similar issue with AliyunOSS in v1.0.1:
I'm fairly certain that this is the same underlying issue, e.g. Aliyun OSS has a broken API for HTTP Range requests. Luckily, there's a way to get around that until Aliyun OSS fixes their API. When using async function main() {
const tiff = await fromUrl(
"https://example.oss-eu-west-1.aliyuncs.com/example.tiff",
{allowFullFile: true}, // add option here
);
const image = await tiff.getImage();
const data = await image.readRasters();
} Hope this helps anyone in the future having the same issue :) |
Seems to Aliyun OSS hasn't solved this problem, there will still be random broken API for HTTP Range requests. |
I am using the fromUrl method to retrieve an overview of a Cloud Optimised Geotiff (COG) from Alibaba, the method works well for geotiffs hosted on amazon S3, but retrieves incorrect data for geotiffs hosted on Alibaba OSS along with the following warning:
RangeError: Offset is outside the bounds of the DataView
.I suspect that the issue may lie in https://github.com/geotiffjs/geotiff.js/blob/master/src/source.js#L257 and may be because the fetch request is reading the wrong bytes or getting some additional bytes from Alibaba.
Below I have added the code I use to retrieve the geotiff overview data from 2 public urls where the same COG is uploaded, one for amazon s3 and one for alibaba OSS, and save it to a csv file. I've set the resX and resY to 1 so it retrieves the lowest resolution overview, which is only 63x63, but the issue occurs for all overviews. I have also added some python code used to visualise the retrieved data which demonstrate the differences visually and may help in debugging and attached the plotted images of the 2 sets of retrieved data.
The first image from amazon contain values of 0, 1 and 5 is the correct data.
The text was updated successfully, but these errors were encountered: