Skip to content
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

Issue parsing geotiffs with deflate compression #158

Open
miccoh1994 opened this issue Mar 27, 2020 · 6 comments
Open

Issue parsing geotiffs with deflate compression #158

miccoh1994 opened this issue Mar 27, 2020 · 6 comments

Comments

@miccoh1994
Copy link

miccoh1994 commented Mar 27, 2020

The Bug
I am accessing data from an API that returns a deflated tiff which I save to a file ('image.tiff').

However, when I try and load this tiff with geoblaze in a nodejs application:

    let imgUrl = 'http://localhost:3000/1.tiff';
    inputImage = await geoblaze.load(imgUrl).catch(e => console.log(e));

I get the following:

Error: Geoblaze had a problem parsing this file. Please make sure that you are sending a proper GeoTIFF file and try again.

However if I take that same geotiff and load it into a GIS (QGIS or Global Mapper) and export it with no compression or with compression such as 'packbits' the data loads correctly.

Typically we expect that since geoblaze is based on geotiff.js (which apparently supports deflate compression) geoblaze should be able to load deflataed geotiffs. Am I missing something here?

@DanielJDufour
Copy link
Member

Hi, @miccoh1994 . I'll update GeoBlaze dependencies and let's see if that helps.

@miccoh1994
Copy link
Author

If it is helpful, when I try load the same geotiff at app.geotiff.io. The console logs:

Error: Unknown compression method identifier: 32946

@DanielJDufour
Copy link
Member

Hi, @miccoh1994 . I believe I fixed this by upgrading the geotiff dependency and publishing a new version (https://www.npmjs.com/package/geoblaze). Could you reinstall and see if it works?

@miccoh1994
Copy link
Author

Hi Daniel, thanks a lot for the publishing the new version. unfortunatley it didn't help.

I figured out the issue is actually a bad build of the georaster dependecy. Had to rebuild georaster then update the node modules in geoblaze then rebuild geoblaze. That fixed the issue! Should I got file an issue at the georaster repo??

@miccoh1994
Copy link
Author

miccoh1994 commented Mar 29, 2020

The issue only occured with minified georaster and geoblaze

@DanielJDufour
Copy link
Member

Yes, please file an issue with GeoRaster! Thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants