Compare commits

..

2 commits

Author SHA1 Message Date
XANTRONIX Industrial
b1401a86c8 Set AFOS message WFO from product/wfo string 2025-02-21 17:17:05 -05:00
XANTRONIX Industrial
902ef26af3 Actually make 'call' primary key for nexrad_radar 2025-02-21 17:16:42 -05:00
2 changed files with 4 additions and 4 deletions

View file

@ -4,7 +4,7 @@ select InitSpatialMetadata(1);
begin transaction;
create table nexrad_wfo (
code TEXT NOT NULL,
code TEXT PRIMARY KEY NOT NULL,
city TEXT NOT NULL,
state TEXT NOT NULL,
address TEXT NOT NULL
@ -15,9 +15,9 @@ select
CreateSpatialIndex('nexrad_wfo', 'coord');
create table nexrad_radar (
wban INTEGER,
call TEXT NOT NULL,
call TEXT PRIMARY KEY NOT NULL,
name TEXT NOT NULL,
wban INTEGER,
site_elevation FLOAT NOT NULL,
tower_height FLOAT NOT NULL
);

View file

@ -217,7 +217,6 @@ class AFOSMessageParser():
self.message.vtec_end = vtec.timestamp_end
self.message.vtec_type = vtec.typeof
self.message.actions = vtec.actions
self.message.wfo = vtec.wfo
self.message.phenom = vtec.phenom
self.message.sig = vtec.sig
self.message.etn = vtec.etn
@ -250,6 +249,7 @@ class AFOSMessageParser():
if match is not None:
self.message.product = match['product']
self.message.wfo = match['wfo']
self.state = AFOSMessageParserState.BODY
def parse_body(self, line: str):