Repository navigation
Conversation
…+ Puerto Rico) Three display-tier radar providers on the existing weather-radar provider contract (auto-discovered via providers/*.js), extending coverage beyond the shipped DWD/DPC/RainViewer set. Independent of the AEMET PR (OpenFairWind#2); they rely only on the in-tree provider contract/registry. - ipma — IPMA national radar composite (Portugal). Two-step keyless feed (transf/radar/imgs-radar.json -> palette PNG); palette PNG decoded with Node's built-in zlib (no image-codec dependency), georeferenced as equirectangular EPSG:4326 and reprojected to tiles. lib/ipma-raster.js is a pure, unit-tested decode/reproject core. - noaa — NOAA NEXRAD CONUS mosaic. XYZ passthrough to the Iowa Environmental Mesonet nexrad-n0q web-mercator tile cache (keyless), like RainViewer. - noaa-pr — NOAA NEXRAD Puerto Rico / USVI. WMS GetMap adapter over the same IEM nexrad-n0q layer (the CONUS XYZ mosaic does not reach the Caribbean). All keyless, live-only, display tier only (no downloadRaw/cellsFromRaw). Each ships unit tests (node --test) and is added to the lint script. Verified against the live feeds.
renderTile sampled the echo grid with nearest-neighbour rounding, so at display zoom each source cell rendered as a hard block with jagged edges. Replace it with a bilinear warp that averages colour only over valid (opaque) source neighbours — transparent no-echo pixels never bleed into the colour — and drives the alpha from the covered fraction of the 2x2 footprint, so echo edges feather out instead of blocking. Adds a regression test asserting the render produces partial-alpha edge pixels (which nearest-neighbour cannot). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ET9sdhUU4uyew792nfV2Sa
Author
|
Pushed a follow-up commit that improves the IPMA tile rendering the same way as the AEMET provider: Added a regression test asserting the render produces partial-alpha edge pixels (which nearest-neighbour cannot). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three display-tier radar providers on the existing weather-radar provider contract, extending regional coverage beyond the shipped DWD / DPC / RainViewer set. Auto-discovered via
providers/*.js; each is keyless, live-only and display tier only (nodownloadRaw/cellsFromRaw).Independent of the AEMET provider PR (#2) — these rely only on the in-tree provider contract/registry, so they can land on their own.
ipmaimgs-radar.json→ palette PNG compositenoaanexrad-n0qXYZnoaa-prnexrad-n0qWMSGetMap(bbox3857)Notes
transf/radar/imgs-radar.jsonnewest-first →.../radar/por/<path>palette PNG, 1500×2331, 5-min cadence).lib/ipma-raster.jsdecodes the palette PNG with Node's built-inzlib(no image-codec dependency), renders the native reflectivity ramp, and reprojects an equirectangular EPSG:4326 fit[-9.6, 36.8, -6.0, 42.2]to tiles. The georef bounds are an initial fit — refine against the IPMA GeoServer WMS bbox if a maintainer has it handy.nexrad-n0qlayer via WMSGetMapusing the request'sbbox3857(the contract explicitly allows WMS adapters).Testing
node --testunits for each (IPMA: palette-PNG un-filtering across all five filter types, georef round-trip, tile render/transparency; NOAA: URL templating with stubbed fetch, cadence, coordinate/validation; NOAA-PR: WMS GetMap query assembly, bbox validation). All added to thelintscript. Also verified against the live feeds (composites decode with real echoes; tiles render over Portugal, CONUS and Puerto Rico respectively).Not included: a Météo France provider — its radar is behind the token-gated API Paquet Radar (15-minute composite packets, Lambert grid), which is materially more work; left for a follow-up.