phpweather-devel Mailing List for PHP Weather (Page 3)
Brought to you by:
iridium
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(4) |
Dec
(7) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(2) |
Feb
(52) |
Mar
(79) |
Apr
(9) |
May
(28) |
Jun
(17) |
Jul
(25) |
Aug
(48) |
Sep
(18) |
Oct
(6) |
Nov
|
Dec
(8) |
2003 |
Jan
(26) |
Feb
(10) |
Mar
(2) |
Apr
(21) |
May
(23) |
Jun
(15) |
Jul
(15) |
Aug
(8) |
Sep
(16) |
Oct
(3) |
Nov
(4) |
Dec
|
2004 |
Jan
(35) |
Feb
(35) |
Mar
(9) |
Apr
(6) |
May
(1) |
Jun
(3) |
Jul
(3) |
Aug
(6) |
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
(4) |
Feb
(6) |
Mar
(6) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(2) |
Nov
|
Dec
|
2006 |
Jan
|
Feb
(5) |
Mar
(7) |
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: SourceForge.net <no...@so...> - 2004-05-10 02:12:19
|
Feature Requests item #951022, was opened at 2004-05-10 02:12 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=951022&group_id=23245 Category: None Group: phpweather-2.x Status: Open Resolution: None Priority: 5 Submitted By: Manuel Serra (manu11) Assigned to: Nobody/Anonymous (nobody) Summary: i'm getting an error Initial Comment: Hi, I'm not sure if i'm posting in the right place. I installed phpweather and it is working with MySQL db. The only problem is when i get a METAR with no data, i receive an error: Notice: Undefined variable: metar_time in /home/wwwfly/public_html/metars/data_retrieval.php on line 430 Notice: Undefined variable: metar_time in /home/wwwfly/public_html/metars/data_retrieval.php on line 434 Warning: Cannot modify header information - headers already sent by (output started at /home/wwwfly/public_html/metars/data_retrieval.php: 430) in /home/wwwfly/public_html/metars/index.php on line 121 How can i correct this? Thanks ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=951022&group_id=23245 |
From: Martin G. <gim...@gi...> - 2004-04-29 21:15:07
|
Rory Oliver <ro...@lo...> writes: Hi Rory I've CC'ed this answer to the PhpWeather mailinglist, so that other's can follow the conversation. Please send your replies there too, but you'll need to subscribe first: http://lists.sourceforge.net/lists/listinfo/phpweather-devel > I am trying to setup phpweather to work with a mysql database. I am > having problems, when I use the database builder, it only creates > one table "pw_stations" but not "pw_metars" or "pw_tafs", as a > result phpweather is not caching the weather reports and so it is > very slow. Do you know how I can fix this? That's a bit strange --- if it creates one table, then I would expect to create them all... > Alternatively, can you supply me with the table structures as I > could not find this anywhere on your resource. The code to create the tables are found in db/pw_db_mysql.php. Having the SQL code in an extern file would actually be a good idea, I've just never thought of that before. function create_tables() { if (!$this->connect()) { return false; // Failure! } /* First we make a table for the METARs */ $this->query('DROP TABLE IF EXISTS ' . $this->properties['db_metars']); $this->query('CREATE TABLE ' . $this->properties['db_metars'] . '( icao char(4) NOT NULL, time timestamp(14), metar varchar(255) NOT NULL, timestamp timestamp(14), PRIMARY KEY (icao))'); /* Then we make a table for the TAFs */ $this->query('DROP TABLE IF EXISTS ' . $this->properties['db_tafs']); $this->query('CREATE TABLE ' . $this->properties['db_tafs'] . '( icao char(4) NOT NULL, time timestamp(14), taf varchar(255) NOT NULL, timestamp timestamp(14), PRIMARY KEY (icao))'); /* and so on... */ -- Martin Geisler My GnuPG Key: 0xF7F6B57B See http://gimpster.com/ and http://phpweather.net/ for: PHP Weather: Shows the current weather on your webpage and PHP Shell: A telnet-connection (almost :-) in a PHP page. |
From: Phil P. <phi...@sw...> - 2004-04-19 22:51:48
|
Sounds like your Weather Map stuff is progressing along quite nicely. After having identified how we could do it, I haven't actually *done* anything more about putting co-ordinates into pw_stations. (busily hacking at the code for other parts of my site, so far) However, having said that, I will note (probably mentioned this on the list before) that I've been playing with AirSort http://utenti.lycos.it/tingon/airsort/ It comes with a table (named airsort) with the following fields: nome (italian for Name) IATA ICAO citta (italian for City) fields named la_? and lo_? (where ? is each of g,p,s,d) altezza (Italian for height) lunghezza (Italian for length) la_d is either N or S lo_d is either E or W So it's clear that the la_? and lo_? fields are the latitude and longitude stored as seperate Degrees/Minutes/Seconds It'd be pretty much trivial to write a short script to read ICAO and LAT/LONG and inject them into newly created fields on the matching pw_stations table. (I can do that) Also we'd really also want someone to process through the original US ICAO stations listing file to ensure we have all the latest listed stations and correct co-ordinates. (I can do that, too) So, basically, getting the data into pw_stations (and verifying it) is work, but not difficult (I'd be happy to do it) what we need is someone with better PHP skillz than myself and more eperience with hacking at phpWeather to take those fields of information in the db and make good use of them. eg mostly importing them into structures when a station is referenced from the database. I've (badly) hacked at a "is it daylight savings time" into the pw_images code which works for my locality, with the LAT+LONG data and I've written a function which calculates Sunrise and Sunset from date+lat+long. So if someone added code for "get lat+long+DST_info from the db and inject it into the in-menory structures" to phpWeather, I can polish off the rest of the work (ie getting the data into the database, and work on pw_?? output routines) to get - Daylight Savings for all stations - calculated sunrise/sunset times for all stations - return correct day/night images based on the above Phil P Jonas Kaufmann wrote: > Hello, > > I updated my approach to generate weather maps for every country with > phpWeather. You can see the current version at > http://www.j0nes.de/wetter/. Currently I included maps for Denmark, > France, Germany and Spain, but other maps can also be integrated. > > I found a very useful class named Geoclass at > http://sourceforge.net/projects/geoclassphp/. Geoclass can draw maps > out of .e00 textfiles (which are freely available for almost every > country at http://www.maproom.psu.edu/dcw/) and also does the > transformation from latitude/longitude values to x/y-positions on the > map. > > A drawback is that I need several values for every map that you have > to figure out first (try and error), for example the range in > latitude/longitude for this country or the size of the map in pixels > and thus the width-to-height-ratio. > > What about the latitude/longitude values for all weather stations? > Phil, browsing the archive I found postings that you had an idea > how to put those values in the pw_stations table. Did you advance in > this? > > Cu > Jonas Kaufmann > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > PHPWeather-devel mailing list > PHP...@li... > https://lists.sourceforge.net/lists/listinfo/phpweather-devel > > |
From: Jonas K. <me...@j0...> - 2004-04-18 18:01:35
|
Hello, I updated my approach to generate weather maps for every country with phpWeather. You can see the current version at http://www.j0nes.de/wetter/. Currently I included maps for Denmark, France, Germany and Spain, but other maps can also be integrated. I found a very useful class named Geoclass at http://sourceforge.net/projects/geoclassphp/. Geoclass can draw maps out of .e00 textfiles (which are freely available for almost every country at http://www.maproom.psu.edu/dcw/) and also does the transformation from latitude/longitude values to x/y-positions on the map. A drawback is that I need several values for every map that you have to figure out first (try and error), for example the range in latitude/longitude for this country or the size of the map in pixels and thus the width-to-height-ratio. What about the latitude/longitude values for all weather stations? Phil, browsing the archive I found postings that you had an idea how to put those values in the pw_stations table. Did you advance in this? Cu Jonas Kaufmann |
From: SourceForge.net <no...@so...> - 2004-04-18 14:55:49
|
Feature Requests item #937353, was opened at 2004-04-18 07:55 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=937353&group_id=23245 Category: Output Group: phpweather-2.x Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: locale_common.php Initial Comment: WHere is this file in the package .zip ??? I would like set the wind measurement in "Kilometers/hs" Thanks Claudio Heidel claudio_heidel @ hotmail.com ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=937353&group_id=23245 |
From: John C. <jo...@ne...> - 2004-04-16 22:00:41
|
It's pretty easy: //You need to include the phpWeather class on your site=20 require_once(FUNCTION_PATH . "phpweather-2.1.2/phpweather.php") //then instantiate a new weather object, $site =3D the ICAO identifier = you want to use $weather =3D new phpweather(array('icao'=3D>$site, 'offset' =3D> '10')); // now that you have an object, get it's data $data =3D $weather -> decode_metar(); // now echo it's temp_f $temp =3D $data['temperature']['temp_f']; Echo $temp; That's untested, but it should work. John Corry > -----Original Message----- > From: php...@li...=20 > [mailto:php...@li...] On=20 > Behalf Of Philip Irvine > Sent: Sunday, April 11, 2004 3:46 AM > To: 'Martin Geisler' > Subject: Request Help With Output From PHPWEATHER >=20 > I do not know PHP and my knowledge of HTML is limited. I=20 > used to program in Fortran and some Assembly Language, but=20 > PHP and HTML are not much like those. >=20 > The PHP WEATHER test page worked fine when I installed the=20 > PHP WEATHER package on the server in=20 > http://www.communitybaptistharvestal.com/phpweather. Thanks=20 > to you and others for creating this complex software package! >=20 > I would like to start PHPWEATHER inside the code for my home=20 > page so that I can insert only the current temperature on my=20 > home page. I need help doing this. >=20 > From file phpweather.txt, temp_f is the current temperature. I added: >=20 > echo temp_f; >=20 > before the ending ?> in phpweather.php as below: >=20 > . > . > . > function tms_unix2date($tmp_tms) { > return gmdate("YmdHis",$tmp_tms); > } > echo temp_f; > ?> >=20 > When I entered > http://www.communitybaptistharvestal.com/phpweather/index.php? > icao=3DKHSV&lang > uage=3Den in the browser, I got:=20 >=20 > Parse error: parse error, expecting `T_OLD_FUNCTION' or=20 > `T_FUNCTION' or `T_VAR' or `'}'' in=20 > /home/pirvine/communitybaptistharvestal-www/phpweather/phpweat her.php on line 101 >=20 > Thanks, > Philip Irvine >=20 >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials Free=20 > Linux tutorial presented by Daniel Robbins, President and CEO=20 > of GenToo technologies. Learn everything from fundamentals to=20 > system = administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dick > _______________________________________________ > PHPWeather-devel mailing list > PHP...@li... > https://lists.sourceforge.net/lists/listinfo/phpweather-devel >=20 |
From: Philip I. <pi...@be...> - 2004-04-16 06:45:20
|
I do not know PHP and my knowledge of HTML is limited. I used to = program in Fortran and some Assembly Language, but PHP and HTML are not much like those. The PHP WEATHER test page worked fine when I installed the PHP WEATHER package on the server in http://www.communitybaptistharvestal.com/phpweather. Thanks to you and others for creating this complex software package! I would like to start PHPWEATHER inside the code for my home page so = that I can insert only the current temperature on my home page. I need help = doing this. From file phpweather.txt, temp_f is the current temperature. I added: echo temp_f; before the ending ?> in phpweather.php as below: . . . function tms_unix2date($tmp_tms) { return gmdate("YmdHis",$tmp_tms); } echo temp_f; ?> When I entered http://www.communitybaptistharvestal.com/phpweather/index.php?icao=3DKHSV= &lang uage=3Den in the browser, I got:=20 Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /home/pirvine/communitybaptistharvestal-www/phpweather/phpweather.php on line 101 Thanks, Philip Irvine |
From: Ondrej J. <ne...@po...> - 2004-03-27 00:54:07
|
On Fri, 26 Mar 2004, Jenni wrote: > > If you want a simple key/value output similar to Nepto.SK [1], I can > > post an appropriate code here, however it is nothing special. [1] > > http://nepto.sk/about-me/news.php > What you have in your current weather box is EXACTLY what I was > looking for. I wanted something in "list" form instead of the big old > paragraph output that comes by default. Well, I understand. Actually, to create paragraph with reasonable sentences is much more sophisticated and difficult work, than simple list of key/values. At least in my native Slovak language. :-) > Do you have the code available so it will look like what is in your > current weather box? The code is in the attachement. It will certainly not work for you at the first time. It has to be used rather as an inspiration. It is plugin for my personal Nepto.SK website, what has currently over 1500 files. I will not post all of these files. Of course, some well-known phpWeather files are included. Also some library files may be required (at least Platon.php). It is part of our Platon SDG [1] basic PHP framework [2] and can be found in our CVS repository accesible via CVSweb [3]. Let me know if you need more information or there will be some problems. [1] http://platon.sk/ [2] http://platon.sk/cvs/cvs.php/phpPlatonLib/Platon/ [3] http://platon.sk/cvs/cvs.php/ -- _/| Ondrej Jombik - ne...@ph... - http://nepto.sk - ICQ #122428216 <_ \ Platon SDG - open source software development - http://platon.sk `\| Ako sa do hory vola, tak sa zhori traktor! (c) 1999 Rattkin/MFF '` |
From: Jenni <je...@da...> - 2004-03-26 19:25:59
|
> If you want a simple key/value output similar to Nepto.SK [1], I can > post an appropriate code here, however it is nothing special. > > [1] http://nepto.sk/about-me/news.php What you have in your current weather box is EXACTLY what I was looking for. I wanted something in "list" form instead of the big old paragraph output that comes by default. Do you have the code available so it will look like what is in your current weather box? Thank you SOOO much! Jenni |
From: Ondrej J. <ne...@po...> - 2004-03-26 16:05:36
|
On Tue, 17 Feb 2004, Daisyhead wrote: > I don't think I'm explaining myself very clear on what I want my weather to > look like. I want a simple list, without the whole paragraph text. Something > that look like this: > Temp: > Feels like: > Conditions: > Wind: > Humidity: > Dewpoint: > Pressure: > Visibility: If you want a simple key/value output similar to Nepto.SK [1], I can post an appropriate code here, however it is nothing special. [1] http://nepto.sk/about-me/news.php > Is there any way to list out the output instead of having it in paragraph > format? I do not understand this. Nepto -- _/| Ondrej Jombik - ne...@ph... - http://nepto.sk - ICQ #122428216 <_ \ Platon SDG - open source software development - http://platon.sk `\| This message was written with Pine, the fastest IMAP mail client '` |
From: Martin G. <gim...@gi...> - 2004-03-16 16:42:27
|
"Fabian Louis" <fa...@fa...> writes: Hi > I=92m very sorry that I have to bother you, but I have a question > about your Script, phpweather and I dont know where to ask . The PhpWeather mailinglist found here is the best place, for then your question reaches as many people as possible: http://lists.sourceforge.net/mailman/listinfo/phpweather-devel I've CC'ed this replay to the list --- maybe someone else have had the same problems... =20=20 > It works well, but I want that the degrees and the percent symbol ( > =B0 and % ) are replaced with the words ( =93Grad=94 and > =93Prozent=94). How can I do that? > I tried this : >=20=20 > $toReplace=3D Array("=B0","%"); > $value=3D Array("Grad", "Prozent"); > $output =3D str_replace($toReplace, $value, $output); >=20=20 > But this doenst work. Why doesn't it work? Your idea should work, except that the degree symbol (=B0) is coded as the corresponding HTML entity: ° in the output from most languages, except in the wind direction in the German output, which I guess is what you're interested in. The following seems to works with German: str_replace(array('°C', '°F', '=BA', '%'), array('Grad C', 'Grad F', ' Grad', ' Procent'), $text->print_pretty()) but a more robust solution would be to edit the pw_text_de.php file directly together with the pw_text.php file. Search for '=BA' and '°' and I'm sure you'll be able to figure things out. --=20 Martin Geisler My GnuPG Key: 0xF7F6B57B See http://gimpster.com/ and http://phpweather.net/ for: PHP Weather: Shows the current weather on your webpage and PHP Shell: A telnet-connection (almost :-) in a PHP page. |
From: Jonas K. <me...@j0...> - 2004-03-05 10:39:56
|
Hello, > Have the HTML page do the query, and send the data in the URL to the map > generate script. Caching this is *trivial* with the Cache::Lite module. > [snip] Thanks, I will try this. >>>One simple thing I'd always thought would look nice was a worldmap with >>>every METAR station pinpointed. ImageMap to select a country, then show >>>(for example) your country weather map, and image-map to get detailed >>>METAR report. >> Nice idea. World map generation can also be done with the script I >> use. We also need positions for every country, so it would >> even be possible to generate the ImageMap to select a country >> dynamically. > You mean simply Lat/Long for each station? I've been looking in to that, > (checkout my earlier posts in the archives) we can get the data easily > (I just need to get my act together and clean it up and thunk it into > the METAR station table) No, we also need the positions of the upper left corner and the lower right corner of the map in addition to the lat/long-data for each station. Perhaps we could create a new table pw_countries (cc, country, min_lat, max_lat, min_long, max_long) to store this information. pw_stations could then be reduced to pw_stations(icao, cc). I don't know whether phpWeather uses the country field from pw_stations. Cu Jonas |
From: Phil P. <phi...@sw...> - 2004-03-05 02:20:09
|
Jonas Kaufmann wrote: >>A simple workaround for the "it's not fast" issue would be to schedule >>(eg cron) the map generation rather than recalculating it for each Page >>View. > > > Yes, this would be really useful. I already use a simple sort of > caching, that is generating the map on the first request and storing > it. Every other request in the next half hour gets the cached version > of the map. Image generation itself is quite fast, getting all METARs > takes a lot of time. So perhaps scheduling the METAR fetch might be > sufficient. I use the PHP/PEAR Cache::Lite module to do my caching, nice and fast and pretty functional. > Another problem is that I have to fetch the METARs twice - one time in > the map-generating script, the other time in the HTML-page to display > the onMouseOver-Information for every station. Even with the built-in > caching of phpWeather, I still have to query my database two times. > Has anybody got an Idea how to solve this? Have the HTML page do the query, and send the data in the URL to the map generate script. Caching this is *trivial* with the Cache::Lite module. /* near the start of your script */ require 'Cache/Lite/Output.php'; $cacheOptions = array( 'cacheDir' => "/full/path/to/cache/directory", //NB cacheDir needs g+wx permissions ); $Cache_Lite = new Cache_Lite_Output($cacheOptions); /* when you need to cache something */ $cacheID = substr($_SERVER["REQUEST_URI"],0,strcspn($_SERVER["REQUEST_URI"],'#')); $Cache_Lite->setLifeTime(30*60); // cache LifeTime is in Seconds $cacheGroup = "weatherMap" ; // :-) just pick a friendly group name if(! ($Cache_Lite->start($cacheID,$cacheGroup))) { /* code here to generate page/image when not cached or cache is invalid */ $Cache_Lite->end(); } $cacheID is the unique identifier of what you're caching $cacheGroup is a name to group multiple cacheIDs (eg you can "flush ThisGroup from the cache", as opposed to flushing TheWholeCache) >>One simple thing I'd always thought would look nice was a worldmap with >>every METAR station pinpointed. ImageMap to select a country, then show >>(for example) your country weather map, and image-map to get detailed >>METAR report. > > > Nice idea. World map generation can also be done with the script I > use. We also need positions for every country, so it would > even be possible to generate the ImageMap to select a country > dynamically. You mean simply Lat/Long for each station? I've been looking in to that, (checkout my earlier posts in the archives) we can get the data easily (I just need to get my act together and clean it up and thunk it into the METAR station table) Enjoy, Phil P |
From: Jonas K. <me...@j0...> - 2004-03-04 11:20:33
|
Hello, > A simple workaround for the "it's not fast" issue would be to schedule > (eg cron) the map generation rather than recalculating it for each Page > View. Yes, this would be really useful. I already use a simple sort of caching, that is generating the map on the first request and storing it. Every other request in the next half hour gets the cached version of the map. Image generation itself is quite fast, getting all METARs takes a lot of time. So perhaps scheduling the METAR fetch might be sufficient. Another problem is that I have to fetch the METARs twice - one time in the map-generating script, the other time in the HTML-page to display the onMouseOver-Information for every station. Even with the built-in caching of phpWeather, I still have to query my database two times. Has anybody got an Idea how to solve this? > One simple thing I'd always thought would look nice was a worldmap with > every METAR station pinpointed. ImageMap to select a country, then show > (for example) your country weather map, and image-map to get detailed > METAR report. Nice idea. World map generation can also be done with the script I use. We also need positions for every country, so it would even be possible to generate the ImageMap to select a country dynamically. Cu Jonas |
From: Phil P. <phi...@sw...> - 2004-03-04 00:10:26
|
Very nice. A simple workaround for the "it's not fast" issue would be to schedule (eg cron) the map generation rather than recalculating it for each Page View. I believe most METARS are only released on an hourly schedule, though I think I recall reading somewhere that some locations generate half-hourly ones. One simple thing I'd always thought would look nice was a worldmap with every METAR station pinpointed. ImageMap to select a country, then show (for example) your country weather map, and image-map to get detailed METAR report. Phil P Jonas Kaufmann wrote: > Hello there, > > as Martin posted some days ago, I developed a little weather map with > the help of phpWeather(see: http://www.j0nes.de/wetter/ - be patient, > a lot of METARs have to be fetched *g* - but weather.noaa.gov seems to > be down, so no data for now). > Together with the idea of having lat/long-data for every station in > the database, it would be possible to generate those maps for every > country on the fly. > > I just checked how to figure out the positions on the map with > latitude and longitude, and this works quite well - assuming that we > have the exact location and range of the map. > A problem might be to find suitable map data for each country. > > But... I found a nice Sourceforge project called GeoClass. It has some > very nice features such as converting lat/long-positions to > x/y-positions, getting position data from DB and storing them in a > GeoObject or, even better, generating maps out of a .e00-textfile. > You can find this project here: http://sourceforge.net/projects/geoclassphp/ > I will have to take a closer look at this project. With the help of > those classes weather map generation might get a lot easier. > > Cu > Jonas Kaufmann > > > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > PHPWeather-devel mailing list > PHP...@li... > https://lists.sourceforge.net/lists/listinfo/phpweather-devel > > |
From: Jonas K. <me...@j0...> - 2004-03-03 20:22:37
|
Hello there, as Martin posted some days ago, I developed a little weather map with the help of phpWeather(see: http://www.j0nes.de/wetter/ - be patient, a lot of METARs have to be fetched *g* - but weather.noaa.gov seems to be down, so no data for now). Together with the idea of having lat/long-data for every station in the database, it would be possible to generate those maps for every country on the fly. I just checked how to figure out the positions on the map with latitude and longitude, and this works quite well - assuming that we have the exact location and range of the map. A problem might be to find suitable map data for each country. But... I found a nice Sourceforge project called GeoClass. It has some very nice features such as converting lat/long-positions to x/y-positions, getting position data from DB and storing them in a GeoObject or, even better, generating maps out of a .e00-textfile. You can find this project here: http://sourceforge.net/projects/geoclassphp/ I will have to take a closer look at this project. With the help of those classes weather map generation might get a lot easier. Cu Jonas Kaufmann |
From: Martin G. <gim...@gi...> - 2004-02-24 13:29:47
|
Phil Pierotti <phi...@sw...> writes: > Martin Geisler wrote: > >> I'm sorry that I haven't commented on those ideas before --- I >> would love to see that implemented! Do you have a SourceForge >> login? If so, then I would be very happy to add you to the >> project. > > I do have a login (somewhere, just need to find it again), though I > would suggest you hold of on adding me to the project just yet. Well... I've always tried to attract people to the project in an attempt to stimulate growth. I can see that I've not spend that much time on PhpWeather lately --- I wasn't even the guy making the latest release (Etienne did that, thanks!) so I now try to make it easy for other people to get involved. > [... lots of experiments with sunrice/set and airsort ...] That sound very promissing! I'm sure we'll find a way of integrating this functionality. -- Martin Geisler My GnuPG Key: 0xF7F6B57B See http://gimpster.com/ and http://phpweather.net/ for: PHP Weather: Shows the current weather on your webpage and PHP Shell: A telnet-connection (almost :-) in a PHP page. |
From: Phil P. <phi...@sw...> - 2004-02-24 06:44:02
|
Martin Geisler wrote: > I'm sorry that I haven't commented on those ideas before --- I would > love to see that implemented! Do you have a SourceForge login? If so, > then I would be very happy to add you to the project. I do have a login (somewhere, just need to find it again), though I would suggest you hold of on adding me to the project just yet. So far I've been simply looking into the requirements and issues behind adding this kind of functionality. I've even done most of the work modifying sunrise/sunset calculations into a PHP function (probably needs a few 'neatness' type cleanups {eg auto-convert DMS to degrees}, but it works). function calc_SunriseSunset($date (=timestamp), $timezone (=hours from GMT, inc DST), $latitude (as decmal), $longitude (as decimal)) {} returns an array being sunrise-timestamp, sunset-timestamp On any page on my website (http://home.swiftdsl.com.au/~Phil.Pierotti/), there's a 'widget' showing the weather (icons) for Sydney (Australia) as extracted by PHPWeather. If you 'mouseover' the (details) link, a DHTML popup (via overLib, see my credits page) in the window will show you the full report. The last line in said detail report uses the rise/set times as calculated by this function. The other day I started looking at the PHPWeather code itself (spefically, to integrate calc_SunriseSunset into day/night evaluation for images) , and my initial (ten second) analysis was along the lines of "this will be non-trivial" (mainly due to my lack of familiarity with the code , and being relatively new to PHP programming). Basically, I was hoping there was someone more familiar with the PHPWeather code who was interested in running with this now that I've gotten some of the basics started. >>Or we could merely leverage the work already done by the developer >>of AirSort: >> >> http://freshmeat.net/projects/airsort/ >> >>AirSort uses a MySQL table which includes ICAO, latitude and >>longitude. >> >>GPL, even :-) I spent yesterday playing around with AirSort and integrated it with the PHPWeather driven page on my site (though it's not 'live', currently only on my private test server - I could post a small trimmed screenshot for the impatient). The biggest hassle I had was that (I think due to some CSS thing I'd done) IE wanted to not draw the table properly (for the empty cells below the point), so the pinpointing was incorrect. Adding in explicit heights for the table cell below the point fixed it. I've also tweaked it for both 'large'(800x400) and 'small' (400x200) maps (and made small maps from the existing large ones). Still need to finish a few more minor 'flexibility' type changes, but it works nicely. From my basic testing, I suspect some of the co-ordinates are off, and several of the ICAOs from PHPWeather don't have entries in the AirSort table. Obviously some data-cleanups due here. So at this point I'm looking to tackle the AirSort flexibility cleanups, and data correctness. Once that's done I'll look at more work on the PHPWeather Lat/Long&Rise/Set issue (since I'll have clean data to work with); however, as I mentioned earlier, it will probably be better (or at least faster) handled by someone who is already familiar with the code. Phil P |
From: Martin G. <gim...@gi...> - 2004-02-23 10:03:36
|
Phil Pierotti <phi...@sw...> writes: > Phil Pierotti wrote: >> Here are some of my random thoughts on enabling sunrise/sunset >> calculations in PHP Weather. >> Current entries in pw_stations = 5130 >> Entries from NOAA (http://weather.noaa.gov/data/nsd_cccc.txt) = 6486 >> - Read the NOAA datafile and update pw_stations >> - additional fields for LAT and LONG, STATE, ALTITUDE >> - add records for new STATIONS (1356 new entries) I'm sorry that I haven't commented on those ideas before --- I would love to see that implemented! Do you have a SourceForge login? If so, then I would be very happy to add you to the project. > Or we could merely leverage the work already done by the developer > of AirSort: > > http://freshmeat.net/projects/airsort/ > > AirSort uses a MySQL table which includes ICAO, latitude and > longitude. > > GPL, even :-) Uhh... this sounds very interesting! Especially coupled with this email I got the other day: > Hello Martin, > > First thank you for your great PHPWeather script. I think it is very > useful and easy to use. After I found this script, I got the idea of > developing a little weather map for every country (well, currently > it's only Germany *g). So I took a map, figured out the positions of > the weather stations, stored the positions in a database and used > GD-library to put current weather symbols, temperature etc. on this > map. > > If you like to have a look: > http://www.j0nes.de/wetter/ -> this may take a little time to load, > as it has to fetch all the METARs first. > > Cu Jonas It would be very cool to have this functionality in PHP Weather, I've asked Jonas for a SF login so that I can add him to the project. Unfortunately I haven't been that lucky with adding people to the project lately because of strange SF bugs: https://sourceforge.net/tracker/?func=detail&atid=200001&aid=898104&group_id=1 -- Martin Geisler My GnuPG Key: 0xF7F6B57B See http://gimpster.com/ and http://phpweather.net/ for: PHP Weather: Shows the current weather on your webpage and PHP Shell: A telnet-connection (almost :-) in a PHP page. |
From: Phil P. <phi...@sw...> - 2004-02-21 03:38:55
|
Phil Pierotti wrote: > Here are some of my random thoughts on enabling sunrise/sunset > calculations in PHP Weather. > > Current entries in pw_stations = 5130 > Entries from NOAA (http://weather.noaa.gov/data/nsd_cccc.txt) = 6486 > > - Read the NOAA datafile and update pw_stations > - additional fields for LAT and LONG, STATE, ALTITUDE > - add records for new STATIONS (1356 new entries) Or we could merely leverage the work already done by the developer of AirSort: http://freshmeat.net/projects/airsort/ AirSort uses a MySQL table which includes ICAO, latitude and longitude. GPL, even :-) Enjoy, PhilP |
From: Daisyhead <je...@da...> - 2004-02-18 04:19:06
|
I don't think I'm explaining myself very clear on what I want my weather to look like. I want a simple list, without the whole paragraph text. Something that look like this: Temp: Feels like: Conditions: Wind: Humidity: Dewpoint: Pressure: Visibility: And this is the code I"m trying to tweak to get the information to be listed as above: <?php require('/home/xxx/public_html/weather/phpweather.php'); $weather = new phpweather(); $weather->set_icao("KOMA"); $foo = $weather->decode_metar(); $temp_c = $foo['temperature']['temp_c']; $temp_f = $foo['temperature']['temp_f']; $miles_per_hour = $foo['wind']['miles_per_hour']; $dew_point = $foo['dew-point']['dew_point']; $visibility_less_than = $foo['visibility']['visibility_less_than']; $feelslike = $foo['feelslike']['feelslike']; $weather = $foo['weather']['weather']; $rel_humidity = $foo['rel_humidity']['rel_humidity']; $altimeter = $foo['altimeter']['altimeter']; echo "Temp: $temp_f ° Fahrenheit<br>"; echo "Feels like: $feelslike<br>"; echo "Conditions: $weather<br>"; echo "Wind: $miles_per_hour MPH<br>"; echo "Humidity: $rel_humidity %<br>"; echo "Dewpoint: $dew_point<br>"; echo "Pressure: $altimeter<br>"; echo "Visibility: $visibility_less_than"; ?> Is there any way to list out the output instead of having it in paragraph format? Thank you, Jenni ----- Original Message ----- From: "Max Hammond" <ma...@fl...> To: "Daisyhead" <je...@da...>; <php...@li...> Sent: Tuesday, February 10, 2004 2:28 AM Subject: RE: Using PHPWeather question > > errr bad HTML on my part. > > > <?php > > // first of all, set up the decoder > require('phpweather.php'); > $weather = new phpweather(); > $weather->set_icao("KOMA"); > > // next, the text parsing > require('output/pw_text_en.php'); > $text = new pw_text_en($weather); > echo $text->print_pretty(); > > echo '<br />'; > > // now, images > require('output/pw_images.php'); > $icons = new pw_images($weather); > echo '<img src="' . $icons->get_sky_image() . > '" height="50" width="80" border="1" alt="Current weather in ' . > $weather->get_location() . '" /> ' . > '<img src="' . $icons->get_winddir_image() . > '" height="40" width="40" border="1" alt="Current wind in ' . > $weather->get_location() . '" /> ' . > '<img src="' . $icons->get_temp_image() .'" />'; > ?> > > is better :) > > max > > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > PHPWeather-devel mailing list > PHP...@li... > https://lists.sourceforge.net/lists/listinfo/phpweather-devel > > |
From: SourceForge.net <no...@so...> - 2004-02-11 14:54:10
|
Feature Requests item #824876, was opened at 2003-10-16 16:51 Message generated for change (Comment added) made by gimpster You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=824876&group_id=23245 Category: Localisation Group: phpweather-2.x >Status: Closed Resolution: None Priority: 5 Submitted By: Julien Delvat (julduck) Assigned to: Nobody/Anonymous (nobody) Summary: French version Initial Comment: Hi, Is there a plan for a French version? If not, I can help you ... Julien (jul...@fr...) ---------------------------------------------------------------------- >Comment By: Martin Geisler (gimpster) Date: 2004-02-11 15:52 Message: Logged In: YES user_id=104098 We now have a French translation made by Guillaume Petit so I'm closing this RFE. ---------------------------------------------------------------------- Comment By: Martin Geisler (gimpster) Date: 2003-10-16 20:47 Message: Logged In: YES user_id=104098 No, I haven't heard that someone should be preparing a French version --- a translation from you would be very nice! (PHP Weather is a project where things seam to happen in jumps when someone suddenly has some time to work on it --- there isn't much planning ahead :-) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=824876&group_id=23245 |
From: SourceForge.net <no...@so...> - 2004-02-11 14:52:35
|
Feature Requests item #664721, was opened at 2003-01-08 23:16 Message generated for change (Comment added) made by gimpster You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=664721&group_id=23245 Category: Output Group: None >Status: Closed Resolution: Accepted Priority: 5 Submitted By: Timothy M. Crider (timcrider) Assigned to: Nobody/Anonymous (nobody) Summary: Some Really Nice Weather Icon Sets Initial Comment: If you are looking to bundle some different icon sets with this software, have a look at: http://www.jdawiseman.com/papers/trivia/weather- icons.html The have alot of really nice icons that are used all over the place. Tim ---------------------------------------------------------------------- >Comment By: Martin Geisler (gimpster) Date: 2004-02-11 15:51 Message: Logged In: YES user_id=104098 We've now got our own icons drawn by Justin Heideman --- but if other people have icons that they would allow us to redistribute, then please let us know! We'll work something out so that PHP Weather can start support theme-packs or something like that. ---------------------------------------------------------------------- Comment By: Martin Geisler (gimpster) Date: 2003-01-11 17:27 Message: Logged In: YES user_id=104098 Sure the icons are copyrighted, but perhaps some of the sites would allow us to ship them? We would of course give full credit and add a link back to their site. I think it's worth to investigate. Regardless of whether or not we can get images from those sites, then pw_images needs to be updated. It should support several different sets of icons --- we already have two sets of icons in 1.x because of the WAP phones. ---------------------------------------------------------------------- Comment By: Max Hammond (iridium) Date: 2003-01-11 15:55 Message: Logged In: YES user_id=81516 In principle good, but all of these images are copyright to their original owners. I feel it would be good to include a set of smaller icons with the program - although we'd have to create them ourselves... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=664721&group_id=23245 |
From: SourceForge.net <no...@so...> - 2004-02-11 14:48:18
|
Feature Requests item #577808, was opened at 2002-07-05 17:25 Message generated for change (Comment added) made by gimpster You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=577808&group_id=23245 Category: Decoding Group: phpweather-2.x >Status: Closed Resolution: Later Priority: 5 Submitted By: Fabrizio Di Meo (fdimeo) Assigned to: Nobody/Anonymous (nobody) Summary: TAF - Terminal Aerodrome Forecasts Initial Comment: Hi all, I think that would be really useful if phpweather were able to decode the TAF also, what do you think about? :o) ---------------------------------------------------------------------- >Comment By: Martin Geisler (gimpster) Date: 2004-02-11 15:47 Message: Logged In: YES user_id=104098 As Etienne has already noted, then version 2.2.0 of PHP Weather now has support for parsing TAF reports, please take a look at this. It's still not done --- your help will be appreciated. ---------------------------------------------------------------------- Comment By: Thomas Michael Winningham (antipasto) Date: 2003-09-12 19:31 Message: Logged In: YES user_id=101704 Did you look at: http://www.srh.noaa.gov/ftproot/MSD/html/note7.html ? ---------------------------------------------------------------------- Comment By: Etienne Tourigny (etienne_t) Date: 2003-09-11 17:55 Message: Logged In: YES user_id=626224 Must of the stuff there (http://www.nws.noaa.gov/mdl/icwf/avnfps/editor.html#TAFDe coder) is already in the cvs code. What I think remains is : - time consistency checks - Consistency Checks Within a Group - NSW (no significant weather) - NIL( AMD) (augmented data) ?? When I did the basic decoding I used the regex's in decode_matar() and I found that only wind shear was missing (it's not in METARs). I think the issue that must be resolved is translating the various time-periods (FM BECMG TEMPO PROB) into hour-by-hour information. Or we could just spew out the time periods as-is. Perhaps we want to have a way of getting the complete forecast for given hour(s)? The difficulty lies in the fact that some periods such as BECMG only give some data such as wind but not visi or clouds... Such as this example: CYVR 111438Z 111512 12008KT P6SM SCT010 BKN060 TEMPO 1519 6SM -SHRA SCT008 BKN030 BECMG 1921 25010KT BECMG 0002 29013KT So we could go through the periods in chronological order and keep the old values that haven't changed while updating the values that have changed (except things like descriptive weather). Keeping in mind that a TEMPO period is only temporary and has no effect on subsequent periods. Does someone have a good link that describes precisely the meaning of the period types? ---------------------------------------------------------------------- Comment By: Thomas Michael Winningham (antipasto) Date: 2003-09-09 21:41 Message: Logged In: YES user_id=101704 Hey I'd love to speed up the availability of this feature! Anyone know anything about extrapolating this information into hour-by-hour information? I found some great regular expressions for TAF on the bottom of this page at: http://www.nws.noaa.gov/mdl/icwf/avnfps/editor.html#TAFDe coder ---------------------------------------------------------------------- Comment By: Martin Geisler (gimpster) Date: 2003-09-05 21:44 Message: Logged In: YES user_id=104098 Okay, welcome aboard! :-) ---------------------------------------------------------------------- Comment By: Etienne Tourigny (etienne_t) Date: 2003-09-05 19:55 Message: Logged In: YES user_id=626224 Sure i'm interested in having CVS access. Please register me as developper and give me the proper cvs access. I'll discuss integration issues on the devel mailing list. ---------------------------------------------------------------------- Comment By: Martin Geisler (gimpster) Date: 2003-09-05 19:36 Message: Logged In: YES user_id=104098 Sounds great! I can give you CVS access and then you'll be able to incorporate your changes into the existing code. I don't know exactly how your extension should be integrated, but perhaps you already have an idea? Let me know if you're interested and I'll include you as a developer on the project. ---------------------------------------------------------------------- Comment By: Etienne Tourigny (etienne_t) Date: 2003-09-05 18:53 Message: Logged In: YES user_id=626224 I've written en extension to retreive and decode TAF forecasts. It's not complete yet but the basics are there. The parts remaining are: pretty output, translation, full testing, other backends than mysql, plus others I might have missed. Please let me know how I can contribute. ---------------------------------------------------------------------- Comment By: Martin Geisler (gimpster) Date: 2002-07-11 21:34 Message: Logged In: YES user_id=104098 Yes, it would be great if PHP Weather could parse TAF reports... but it can't do this at the moment, and it'll be a while before it can - unless someone finds the time to write the code that is :-) ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2002-07-07 17:29 Message: Logged In: NO yes, id love it if i could get predictions too ;-) It would be well amazing, ontop of the already great current weather reports ;-) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=577808&group_id=23245 |
From: SourceForge.net <no...@so...> - 2004-02-11 14:19:18
|
Feature Requests item #891080, was opened at 2004-02-05 16:02 Message generated for change (Comment added) made by gimpster You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=891080&group_id=23245 Category: Localisation Group: None >Status: Closed Resolution: None Priority: 5 Submitted By: Nick Crossland (ncrossland) >Assigned to: Martin Geisler (gimpster) Summary: UK language file - meter/metre Initial Comment: I have done a UK English language file, since we spell metric units differently: metres kilometres rather than the American meters kilometers Don't know where to submit the file to though. ---------------------------------------------------------------------- >Comment By: Martin Geisler (gimpster) Date: 2004-02-11 15:12 Message: Logged In: YES user_id=104098 Thanks for pointing this out, I've added your file to CVS, calling it pw_text_en_GB because I believe that the correct name for the British English locale is en_GB. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=891080&group_id=23245 |