mirror of
https://github.com/zvx-echo6/central.git
synced 2026-05-22 02:24:38 +02:00
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:
parent
f9426caa27
commit
a157f39fe0
4 changed files with 660 additions and 513 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -22,6 +22,8 @@ class RegionConfig(BaseModel):
|
|||
)
|
||||
if self.east == self.west:
|
||||
raise ValueError("east and west cannot be equal (zero-width bbox)")
|
||||
if self.east < self.west:
|
||||
raise ValueError("antimeridian-crossing bboxes not supported")
|
||||
return self
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue