GeoTIFF / GeoTIFF/georaster-layer-for-leaflet-example
Cloud Optimized GeoTIFFs are shown pixelated
- Dominant language
- JavaScript
- Stars
- 98
- Forks
- 31
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
Cloud-optimized GeoTIFFs are shown pixelated.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to https://geotiff.github.io/georaster-layer-for-leaflet-example/examples/load-cog-via-script-tag.html
2. The image shows pixelation:

**Expected behavior**
The library should pick the most appropriate overview imagery and by that the image should be rendered with less or "no" pixelation.
**Desktop (please complete the following information):**
- Firefox 84.0.1, no page zoom is set.
**Additional context**
I would guess that the wrong overview level is shown?
The example file uses 256x256 blocks. However in the HTML a `resolution` of 128 is used. Is that supposed to match? The parameter is not really documented in a way that is clear:
https://github.com/GeoTIFF/georaster-layer-for-leaflet-example/blob/9d3b10d1ceec1fb6b34ccb08b6ee5fda2b090cbf/main.js#L33
Setting the `resolution` parameter to 256 makes it look good but I have no clue what that actually does.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the example at load-cog-via-script-tag.html and inspect main.js around line 33, where resolution is set to 128. Reproduce the pixelation, compare the result with resolution 256, and determine whether the example setting or overview selection causes it. Done means the example renders the appropriate overview with reduced pixelation and the resolution parameter’s purpose is clear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100