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

Latest release broke my implementation for COG #51

Open
JohnMBrandt opened this issue Jul 1, 2020 · 1 comment
Open

Latest release broke my implementation for COG #51

JohnMBrandt opened this issue Jul 1, 2020 · 1 comment

Comments

@JohnMBrandt
Copy link

JohnMBrandt commented Jul 1, 2020

With small geotiffs (<1000x1000), the latest release causes an error

Error: No image at index 4

With large geotiffs (5000x5000+) this is not a problem. I have fixed it by relying on version 1.0.0. The no image at index issue is altered by the pyramiding for the COG.

In GDAL, pyramiding a TIF with:

!gdaladdo -r average -ro ../data.tif 2 4 8 16

will cause a No image at index 4 error, while pyramiding with:

!gdaladdo -r average -ro ../data.tif 2 4 8 16 32

will cause a No image at index 5 error

I am using georaster-layer-for-leaflet to display COGs on a leaflet webmap. My COG is loaded like so:

var url_to_geotiff_file = "https://bucket.storage.googleapis.com/" + variable + ".tif";

        parseGeoraster(url_to_geotiff_file).then(georaster => {
          var layer = new GeoRasterLayer({
              attribution: "",
              georaster: georaster,
              resolution: 768,
              pixelValuesToColorFn: values => values[0] >= 0.33 ? "#6cbe76" : null,
          });
@DanielJDufour
Copy link
Member

Oof. Sorry this happened. I think it's an issue with one of our dependencies. I'll investigate and get back to 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