GeoTIFF / GeoTIFF/georaster-layer-for-leaflet-example

Cloud Optimized GeoTIFFs are shown pixelated

Open
#9 1 comment 0 reactions 0 assignees View on GitHub
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:
![image](https://user-images.githubusercontent.com/7661092/103478984-9399e100-4dca-11eb-81a2-d83c20caac9e.png)

**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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.