MapColonies / MapColonies/GpkgMerger

Mixed tile format doesn't work for S3 and FS

Open
#169 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
1
Forks
2
Avg merge
21m
Merged PRs (30d)
1

Description

Describe the bug
When working with files, the merger uses file extension with no regard to existing file extension. This means that if a PNG file is merged with a new JPEG resulting in a full tile (JPEG) then it will be stored and both files would exist (for the same x,y,z).

To Reproduce

  1. Hold a tile with transparency in FS or S3
  2. Update with a tile that should result in a tile with no transparency
  3. New tile is written next to the existing tile

Expected behavior
Only the new calculated tile should exist.

Additional context
To combat this mapproxy uses .mixed extension, this way at the end the correct data would be placed. This is because the file extension isn't needed for discovering the tile format (can be understood from tile data).
If we implement the same strategy then we will be able to use mixed format with Mapproxy serving as well.

Contributor guide

No contributing guide indexed for this repository

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 by locating the merger paths that write tiles to FS and S3, then trace how the output file extension is selected when PNG and JPEG data are combined. Reproduce the transparency-to-no-transparency scenario from the issue. Done means the newly calculated tile replaces the existing tile rather than leaving both extensions, while remaining compatible with MapProxy serving.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.