georaster
georaster copied to clipboard
Latest release broke my implementation for COG
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,
});
Oof. Sorry this happened. I think it's an issue with one of our dependencies. I'll investigate and get back to you!