Skip to content

fix(models): keep a storm-report Point at (0, 0) (#59) - #60

Merged
Reddimus merged 1 commit into
mainfrom
fix/storm-report-origin-point
Nov 23, 2026
Merged

Reddimus merged 1 commit into
mainfrom
fix/storm-report-origin-point

Conversation

@Reddimus

Copy link
Copy Markdown
Owner

Summary

parse_storm_reports took a (0, 0) location to mean the Point was missing (LonLat defaults to (0, 0)). So a Point at exactly (0, 0) was replaced by the lon/lat in the properties. A has_point flag now records whether the Point's coordinates were read, and the properties are used only when they weren't. #57 fixed the same 0-as-absent bug for magf and LABEL; this is the case it missed.

Nothing else changes: a missing, null, or non-numeric Point still falls back to the property lon/lat, and the golden IEM fixture (624 reports, none at (0, 0)) gives the same output.

Testing

  • Added Parser.StormReportPointAtOriginIsKept. It failed before the fix (feature 0 came back as (-97.5, 37.7)) and passes after it.
  • make test (210/210, golden and parity unchanged), make lint, make lint-md, make fixtures-check, make test-consumers
  • clang-tidy: not run locally, because Homebrew LLVM 18 can't link against this Mac's SDK. CI's tidy job covers it.

Fixes #59

parse_storm_reports used a (0, 0) location as its signal that the Point
was missing, so a Point at exactly (0, 0) was replaced by the property
lon/lat. Track whether the Point was read instead.

Fixes #59
@greptile-apps

greptile-apps Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5 Tier: apex

[Medium impact] This PR appears safe to merge.

Summary

parse_storm_reports now tracks whether coordinates were read instead of treating (0, 0) as missing.

  • Storm reports keep valid GeoJSON points at the origin.

Reviews (1) · Last reviewed commit: "fix(models): keep a storm-report Point a..." · Reviewed by Greptile

@Reddimus
Reddimus merged commit 8943289 into main Nov 23, 2026
15 checks passed
@Reddimus
Reddimus deleted the fix/storm-report-origin-point branch November 23, 2026 17:22
@Reddimus Reddimus mentioned this pull request Nov 23, 2026
2 tasks done
Reddimus added a commit that referenced this pull request Nov 23, 2026
## Summary

Prepares `v0.4.11`, a patch release with one fix:

- `parse_storm_reports` keeps a Point at exactly `(0, 0)` instead of
replacing it with the property `lon`/`lat` (#59, #60).

Changes, following the steps in CONTRIBUTING.md:

- `include/spc/version.hpp`: `SPC_VERSION_PATCH` 10 → 11
- `CHANGELOG.md`: the `[Unreleased]` entries are now under `[0.4.11] -
2026-11-23`
- `README.md`: `GIT_TAG v0.4.11` (`find_package(spc 0.4 REQUIRED)` stays
the same)

## Testing

- [x] `make test` (210/210), `make lint`, `make lint-md`, `make
fixtures-check`
- [x] `make test-consumers` (`consumer checks passed (v0.4.11,
find_package(spc 0.4))`)

After this merges, `main` gets tagged `v0.4.11`, which runs
`release.yml`.
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.

parse_storm_reports treats a present Point at exactly (0, 0) as missing and overwrites it with property lon/lat (zero-fallback #56 missed this one)

1 participant