locationtech / locationtech/geotrellis

Incorrect Pyramid levels when using LocalLayoutScheme

Open
#3,414 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug question
Dominant language
Scala
Stars
1.4k
Forks
360
Avg merge
6h 57m
Merged PRs (30d)
12

Description

Describe the bug

When creating a Pyramid that uses 'LocalLayoutScheme', for an RDD where the extent is not nicely aligned to the LayoutDefinition, lower zoom levels are corrupt.

Example screenshot

(Those white vertical strips are not supposed to be there)

image

To Reproduce

I experienced this with this code:
https://github.com/Open-EO/openeo-geotrellis-extensions/blob/b38029ac83e671e70ff85b15e055d6f696c11641/openeo-geotrellis/src/main/scala/org/openeo/geotrellis/geotiff/package.scala#L179
Reproducing it in a unit test was more difficult, because the RDDs in my tests are too well aligned.

I personally solved it by using a custom layout scheme, which simply multiplies the cellsize with a factor 2, which aligns better with halving tile sizes:
https://github.com/Open-EO/openeo-geotrellis-extensions/blob/f3fcb0ec13aa6048773aea283aa1eb14c8a0791e/openeo-geotrellis/src/main/scala/org/openeo/geotrellis/geotiff/package.scala#L174

This may also be better behavior for the LocalLayoutScheme included in Geotrellis?

Expected behavior

Correct overviews

Environment

  • Java version: 1.8
  • Scala version: 2.11
  • GeoTrellis version: 3.6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with LocalLayoutScheme and the reproduction code in openeo-geotrellis-extensions/src/main/scala/org/openeo/geotrellis/geotiff/package.scala, especially the referenced lines. Investigate how unaligned RDD extents are handled at lower pyramid levels and compare with the custom layout scheme described there. Done means overviews no longer contain the reported white vertical strips, ideally with a reproducible unit test.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.