Document the Brīdinājumi workflow and projection calibration
This commit is contained in:
@@ -30,6 +30,7 @@ Staging currently exercises the PostgreSQL → API → frontend path with synthe
|
||||
- Serves JSON API routes and the built frontend from `web/dist`.
|
||||
- Queries and aggregates station observations in PostgreSQL.
|
||||
- Contains ingestion/parsing code for LVGMC station and forecast data.
|
||||
- Fetches LVĢMC open hydrometeorological-warning metadata and polygon coordinates on request, with a 5-minute in-memory cache and stale-data fallback if the upstream call fails.
|
||||
- Contains HARMONIE discovery, download, GRIB parsing, and rendering support.
|
||||
- Starts scheduled ingestion/cleanup tasks unless `ENABLE_SCHEDULED_JOBS=false`.
|
||||
|
||||
@@ -82,6 +83,12 @@ The renderer attaches each normalized 256×256 weather image to the measured edg
|
||||
|
||||
Monda Regular and Bold are bundled locally and used by the interface and generated text. Weather symbols are bundled as independent transparent PNG assets.
|
||||
|
||||
### Brīdinājumi
|
||||
|
||||
Brīdinājumi renders the current LVĢMC warning polygons over the same `map_1920x1080`/`map_3840x1440` backgrounds used by Kartes, plus a production border-outline overlay drawn last so it stays crisp above the softened data layer. Warning severities are blurred and filled onto an offscreen layer before compositing, giving the broadcast graphic a feathered rather than hard-edged warning area.
|
||||
|
||||
The backend returns warning polygons as raw latitude/longitude points; the frontend projects them to pixel space with a per-resolution affine transform (`x = a·lon + b·lat + c`, `y = d·lon + e·lat + f`). Each transform is a least-squares fit of well-spread Latvian cities' real-world coordinates against the pixel positions already validated for these same map backgrounds by Kartes/Faktiskā (`cityCoords.ts` + `mapConsts.ts`), rather than an independently eyeballed calibration. An earlier 4-corner bounding-box version of this projection could not represent the source artwork's rotation/shear and drifted up to ~200px on the 3840 canvas; the affine fit lands within ~35px.
|
||||
|
||||
## What the repository does not provide by itself
|
||||
|
||||
- Authorized provider accounts and credentials.
|
||||
|
||||
Reference in New Issue
Block a user