Skip to content

planner: add the Wind data layer - #2349

Merged
timohueser merged 3 commits into
developfrom
claude/planner-wind-layer
Oct 3, 2026
Merged

timohueser merged 3 commits into
developfrom
claude/planner-wind-layer

Conversation

@timohueser

@timohueser timohueser commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Summary

The Wind layer reads the shared climate archive. It follows the owner decisions in #2329.

  • Map: a ~9 km cell has a colour only from a mean daytime speed of 2.5 m/s in the week (owner decision); calm cells stay unpainted. One arrow per cell points where the wind of the month most often blows towards. The arrow is slim and white on a thin dark halo. It is wider when the wind is steady and double-headed for two opposite winds. Arrows are a MapLibre symbol layer and colours a fill layer, both from GeoJSON built from the overview tiles in view. At low zoom, the arrows thin out to every second or fourth cell.
  • Year slider: the chance of headwind on the route per month (windRow), with the label line. Without a route, the track is empty.
  • Profile strip: each sample is shaded by the chance of headwind for its travel direction. The direction spans 0.5 km before and after the sample, so hairpins do not break the strip into specks.
  • Point chart: ten years of weekly daytime speeds, and the wind rose of the month with the travel direction (WindRose.svelte in the extra slot). The headline and the rose read the overview tile. The weekly grid appears when the detail tile of the point arrives.
  • Legend: the painted speed scale (2.5 to 5+ m/s), the unpainted calm cells and an arrow key (Legend.marks).
  • Shared climate code: openClimate keeps one source per archive URL for Weather and Wind. detailCell reads a detail cell from a reactive cache of decoded tiles and starts the load of a missing tile. Both layers now use it for the point chart (and Weather for the night labels), so a route reads only overview tiles.
  • A failed tile load while the map draws sets the layer error; the next move retries.
  • specTile moves to test-support/planner/climate-tiles.ts for the climate and wind tests.

Measurements

Local preview of the Baden-Württemberg data with the BW climate archive:

  • Freiburg to Baden-Baden (139 km), no chart opened: 6 climate requests (header, metadata, 4 overview reads), no detail tile. The result is the same for Weather and Wind.
  • One strip chart opened: 1 more request (one detail tile), for either layer.
  • A hidden layer requests nothing.
  • Cells and arrows of a view: 0.6 to 3.3 ms to build (1 to 4 overview tiles, up to 744 cells).
  • test:planner budget: unchanged (the request test has no climate archive).

Checks

  • npx vitest run src/lib/planner/ src/components/planner/: 202 tests pass.
  • svelte-check: no new findings (the 15 remaining errors are the unbuilt wasm packages).
  • npm run test:planner: pass.
  • obc suites check, obc prose --check: pass.

Pending owner choice, not in this PR: branch claude/planner-wind-straight-double draws a double arrow as one straight line on the mean axis of its two directions.

Public docs changed: no

Requirements: none

🤖 Generated with Claude Code

The Wind layer reads the shared climate archive. The map colours each
cell by the mean daytime speed of the week and draws one arrow per cell
for the most frequent direction of the month: thicker when the wind is
steady, double-headed for two opposite winds. Arrows thin out at low
zoom. The year slider and the profile strip show the chance of headwind
for the travel direction; the point chart shows ten years of weekly
speeds and the wind rose.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9da86d3e-6de3-40a5-9278-5d3a9f82236c
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

A route now reads only overview tiles. The point chart reads the detail
tile of its point through a reactive cache in the shared climate source,
and its weekly grid appears when the tile arrives. A failed tile load
while drawing the map sets the layer error and retries on the next move.
The map paints a cell only from a mean of 2.5 m/s, so calm weeks show
the arrows on the plain map. The arrows are slim and white on a thin
dark halo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Weather now reads detail tiles on demand through detailCell as well, so
a route of either layer reads only overview tiles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@timohueser
timohueser merged commit 6eb5040 into develop Oct 3, 2026
28 checks passed
@timohueser
timohueser deleted the claude/planner-wind-layer branch October 3, 2026 22:30
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.

1 participant