[horde] Weather Block and the Weather Channel

Simon Brereton simon.brereton at buongiorno.com
Tue Oct 25 16:04:27 UTC 2011


On 25 October 2011 11:18, Tom Buehlmann <tomnet at tbuhl.ch> wrote:
>
> Zitat von "Alexander M. Wirtz" <lists at zyanka.li>:
>
>> Have you tried to follow the steps as described in
>> http://wiki.horde.org/MetarWeather ?
>>
>> Regards,
>> Alexander
>
> The script didn't work for me. "Zero" points added to Database"
>
> I had to fetch the Data manually, because the gz-files just hat zero lenght
> :(
>
> for Airports (i guess)
> http://weather.noaa.gov/data/nsd_bbsss.txt
>
> for country:
> http://weather.noaa.gov/data/nsd_cccc.txt
>
> gzip them and add a -f option to your statemnet pointing to the gz-file
> using the apropriate -a or -l setting.
>
> (see  buildMetarDB.php -h )

Thanks for the preemptive answer to my last question.

I collected the data and reran the commands (but forgot to add the -f
switch!).  This time I had a DB error..

mail:/usr/share/horde4# php5
/usr/share/php/data/Services_Weather/buildMetarDB.php -a -u horde -p
804LCi -d horde
        Line 4085: INSERT INTO metarAirports
VALUES(4084,null,null,'KSTZ','South Timbalier','United
States','4',28-09-35N,-90.6664,0,0,-74.1806,0,-6377.7186)
DB Error: no such field
Services_Weather: 6700 metarAirports added to database 'horde' (1 error(s)).


There seems to be an issue with the DB - but I'm not sure this is
something the Horde team can fix..  However, now I have locations.

When I reran the command with the -f switch I encountered this error
(or over 6000 of them to be exact)..

Services_Weather: Invalid data in file!
        Line 18249: ZYTX;--;---;Shenyang /
Taokian;;China;2;41-48N;123-24E;;;35;;
Services_Weather: 11548 metarLocations added to database 'horde' (6701
error(s)).


I'm not inclined to be too fussy - it's working (although I haven't
tried selecting South Timbalier..  Nor am I inclined to.  Oh what the
heck.  I tried it and it even seemed okay..

As Michael said, it's not pretty, but at least it works.  And it
doesn't forecast which, I suppose is the main drawback (if I wanted to
know the weather now, I could just look out the window).


Simon


More information about the horde mailing list