fix(nws): replace centroid filter with polygon intersection

- Add shapely dependency for geometry intersection
- Replace _point_in_region with _geometry_intersects_region
- Uses Shapely shape() and box() for proper GeoJSON handling
- Avoids false negatives on large alert polygons

Also adds antimeridian-crossing bbox rejection to RegionConfig validator.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Matt Johnson 2026-05-16 19:05:05 +00:00
commit a157f39fe0
4 changed files with 660 additions and 513 deletions

View file

@ -18,6 +18,7 @@ dependencies = [
"nats-py>=2.14.0",
"pydantic>=2,<3",
"pydantic-settings>=2.7.0",
"shapely>=2.0",
"tenacity>=9.1.4",
]