-
Notifications
You must be signed in to change notification settings - Fork 0
Filter functions
Here, I'll attempt to explain what the included helper functions do in phpqbt. I originally wrote the code to get various information from warning products and insert them into a database. I've decided to leave the helper functions in the course of making phpqbt a standalone package.
One argument: the full warning text. Returns an array of all the Valid Time Extent Codes (or VTEC) in the warning text.
One argument: the full warning text. Returns a non-delimited list of UGC zones the message is valid for. If you want this in an array, simply comment out the $ugc = implode ($ugc);
line in the function.
One argument: any VTEC. Returns an ID code based on the issuing WFO, event type, and event tracking number.
One argument: the full warning text. Returns a list of latitude/longitude points, these draw the warning polygon on a map.
One argument: the full warning text. Returns an indexed array with elements lat1, lng1, lat2, lng2. These are two lat/long points that represent a one-hour storm track, if it's given. This is typically only present in Severe Thunderstorm and Tornado warnings.
One argument: any VTEC. Returns an indexed array with elements eff and exp. These are UNIX timestamps of the effective and expiry time of a message.
One argument: the full warning text. This reads the parallelogram points of any watches present in an incoming SEV message. Returns an indexed array with elements named by currently effective watches. These elements contain lat/long point lists just like those returned by get_polygon.
One argument: space-delimited polygon points returned by get_polygon. Returns the Olson timezone id of the center of the polygon.