Latest release broke my implementation for COG
- Dominant language
- JavaScript
- Stars
- 96
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
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:
```javascript
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,
});
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the failure with the GDAL pyramiding commands and a small COG, then trace how the JavaScript implementation handles pyramid levels and image indexes. Done means small COGs created with the reported overviews load without a “No image at index” error while larger COGs continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100