Skip to content

Pre-render Map Features as Cached RGBA Image#50

Merged
pirmink merged 16 commits into
MeteoSwiss-APN:mainfrom
leuty:save_map_background
Apr 23, 2026
Merged

Pre-render Map Features as Cached RGBA Image#50
pirmink merged 16 commits into
MeteoSwiss-APN:mainfrom
leuty:save_map_background

Conversation

@leuty

@leuty leuty commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

This PR is a follow up of #49. When waling home I had the idea to cache the entire map background as this requires the least amount of changes. This is implemented in the first commit.

The rest are mostly drive-by cleanups and small fixes.

A quick timing showed about a 30% reduction in runtime.

@pirmink pirmink self-assigned this Apr 16, 2026
@pirmink pirmink requested a review from jansingl April 16, 2026 07:18

@jansingl jansingl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for these improvements! The topography actually even looks nicer now.

The only thing I saw in the visual comparison that @pirmink sent me is that the top boundary of the map seems to be cut off. I don't know which part of the code causes this, and it is only cosmetics anyways.

Image

@pirmink

pirmink commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

@leuty if you had an idea why the upper edge of the frame is missing and found a fix for this, I would wait with the merge, otherwise I'll merge it anyways as this glitch is nothing essential.

@leuty

leuty commented Apr 21, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review. The issue causing the clipping was a plus-minus-one error. The new solution should be more robust.

Here is a png including the latest changes:
image

@pirmink pirmink merged commit 7a3d698 into MeteoSwiss-APN:main Apr 23, 2026
1 check passed
@leuty leuty deleted the save_map_background branch April 23, 2026 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants