Aller à la page: [-1] 1 - 2

Fin
Canadian Cities
  • Envoyé: 11.02.2004, 15:09
       
    vedrine
    rang:
    Site Admin Site Admin
    enregistré depuis:
     décembre 2003
    Status:
    hors ligne
    dernière visite:
    12.05.08
    Messages:
    257
    Well done !!
    but it should be better to change the line
    $city_name = 'Canada';
    to something like
    $city_name = 'New Scotia';
    Because if you don't do this, the module will work but it will be confused during package addition and deletion operations because city packages are searched by name in the package table.
    It is not very important to include every city. If later we add some cities, all we have to do is produce a new updated package and increment the line
    $city_version = 1.0; to something greater than 1.0
    and the module will take care of the upgrade process !!
    So for now we have 2 provinces done (Ontario and new Scotia) !! In less that a day, anybody else ??
    The weathernetwork.com url given in a previous message is a great source to have all the cities in a province. Thanks, it helps me a lot !!
  • Envoyé: 11.02.2004, 17:07
       
    vedrine
    rang:
    Site Admin Site Admin
    enregistré depuis:
     décembre 2003
    Status:
    hors ligne
    dernière visite:
    12.05.08
    Messages:
    257
    Here is my first try for Quebec, please mail me if you see errors or missing cities
    Code
    <?php

    $city_name = 'Quebec';
    $city_version = 1.0;
    $subdiv_id = 123;
    $country_id = 15;
    $region_id = 4;
    $city_data = array();

    $city_data[] = array('accid' => 'CAXX0012', 'name' => 'Ascot Corner');
    $city_data[] = array('accid' => 'CAXX0016', 'name' => 'Aylmer');
    $city_data[] = array('accid' => 'CAXX0018', 'name' => 'Bagotville');
    $city_data[] = array('accid' => 'CAXX0019', 'name' => 'Baie-Comeau');
    $city_data[] = array('accid' => 'CAXX0020', 'name' => 'Baie-Saint-Paul');
    $city_data[] = array('accid' => 'CAXX0024', 'name' => 'Barachois');
    $city_data[] = array('accid' => 'CAXX0028', 'name' => 'Beauport');
    $city_data[] = array('accid' => 'CAXX0029', 'name' => 'Beausejour');
    $city_data[] = array('accid' => 'CAXX0031', 'name' => 'Becancour');
    $city_data[] = array('accid' => 'CAXX0032', 'name' => 'Bedford');
    $city_data[] = array('accid' => 'CAXX0040', 'name' => 'Boucherville');
    $city_data[] = array('accid' => 'CAXX0047', 'name' => 'Bromptonville');
    $city_data[] = array('accid' => 'CAXX0053', 'name' => 'Cacouna');
    $city_data[] = array('accid' => 'CAXX0060', 'name' => 'Cap Chat');
    $city_data[] = array('accid' => 'CAXX0061', 'name' => 'Cap-de-la-Madeleine');
    $city_data[] = array('accid' => 'CAXX0062', 'name' => 'Cap-des-Rosiers');
    $city_data[] = array('accid' => 'CAXX0068', 'name' => 'Chambord');
    $city_data[] = array('accid' => 'CAXX0070', 'name' => 'Chapais');
    $city_data[] = array('accid' => 'CAXX0071', 'name' => 'Charlesbourg');
    $city_data[] = array('accid' => 'CAXX0075', 'name' => 'Chibougamau');
    $city_data[] = array('accid' => 'CAXX0076', 'name' => 'Chicoutimi');
    $city_data[] = array('accid' => 'CAXX0079', 'name' => 'Chute-aux-Outarde');
    $city_data[] = array('accid' => 'CAXX0080', 'name' => 'Clairmont');
    $city_data[] = array('accid' => 'CAXX0158', 'name' => 'Gatineau');
    $city_data[] = array('accid' => 'CAXX0164', 'name' => 'Godbout');
    $city_data[] = array('accid' => 'CAXX0169', 'name' => 'Gracefield');
    $city_data[] = array('accid' => 'CAXX0194', 'name' => 'Hull');
    $city_data[] = array('accid' => 'CAXX0196', 'name' => 'Iles-de-la-Madeleine');
    $city_data[] = array('accid' => 'CAXX0207', 'name' => 'Joliette');
    $city_data[] = array('accid' => 'CAXX0208', 'name' => 'Jonquiere');
    $city_data[] = array('accid' => 'CAXX0229', 'name' => 'La Baie');
    $city_data[] = array('accid' => 'CAXX0231', 'name' => 'La Grande');
    $city_data[] = array('accid' => 'CAXX0232', 'name' => 'La Malbaie');
    $city_data[] = array('accid' => 'CAXX0236', 'name' => 'Lachine');
    $city_data[] = array('accid' => 'CAXX0243', 'name' => 'Laval');
    $city_data[] = array('accid' => 'CAXX0245', 'name' => 'Lennoxville');
    $city_data[] = array('accid' => 'CAXX0247', 'name' => 'Levis');
    $city_data[] = array('accid' => 'CAXX0257', 'name' => 'Longueuil');
    $city_data[] = array('accid' => 'CAXX0258', 'name' => 'Loretteville');
    $city_data[] = array('accid' => 'CAXX0259', 'name' => 'Lucan');
    $city_data[] = array('accid' => 'CAXX0260', 'name' => 'Luceville');
    $city_data[] = array('accid' => 'CAXX0267', 'name' => 'Magog');
    $city_data[] = array('accid' => 'CAXX0270', 'name' => 'Malartic');
    $city_data[] = array('accid' => 'CAXX0271', 'name' => 'Malton');
    $city_data[] = array('accid' => 'CAXX0272', 'name' => 'Maniwaki');
    $city_data[] = array('accid' => 'CAXX0277', 'name' => 'Matane');
    $city_data[] = array('accid' => 'CAXX0278', 'name' => 'Matapedia');
    $city_data[] = array('accid' => 'CAXX0296', 'name' => 'Moisie');
    $city_data[] = array('accid' => 'CAXX0299', 'name' => 'Mont-Joli');
    $city_data[] = array('accid' => 'CAXX0300', 'name' => 'Mont-Laurier');
    $city_data[] = array('accid' => 'CAXX0301', 'name' => 'Montreal');
    $city_data[] = array('accid' => 'CAXX0322', 'name' => 'Nicolet');
    $city_data[] = array('accid' => 'CAXX0323', 'name' => 'Nipigon');
    $city_data[] = array('accid' => 'CAXX0331', 'name' => 'Notre-Dame-du-Portage');
    $city_data[] = array('accid' => 'CAXX0344', 'name' => 'Outremont');
    $city_data[] = array('accid' => 'CAXX0361', 'name' => 'Pointe-Lebel');;
    $city_data[] = array('accid' => 'CAXX0373', 'name' => 'Port-Cartier');
    $city_data[] = array('accid' => 'CAXX0378', 'name' => 'Price');
    $city_data[] = array('accid' => 'CAXX0385', 'name' => 'Quebec');
    $city_data[] = array('accid' => 'CAXX0388', 'name' => 'Radisson');
    $city_data[] = array('accid' => 'CAXX0400', 'name' => 'Richmond');
    $city_data[] = array('accid' => 'CAXX0402', 'name' => 'Rimouski');
    $city_data[] = array('accid' => 'CAXX0405', 'name' => 'Riviere-du-Loup');
    $city_data[] = array('accid' => 'CAXX0406', 'name' => 'Roberval');
    $city_data[] = array('accid' => 'CAXX0446', 'name' => 'Schefferville');
    $city_data[] = array('accid' => 'CAXX0454', 'name' => 'Sherbrooke');
    $city_data[] = array('accid' => 'CAXX0506', 'name' => 'Tracy');
    $city_data[] = array('accid' => 'CAXX0509', 'name' => 'Trois-Rivieres');
    $city_data[] = array('accid' => 'CAXX0516', 'name' => 'Val-d'Or');
    $city_data[] = array('accid' => 'CAXX0520', 'name' => 'Verdun');
    $city_data[] = array('accid' => 'CAXX0531', 'name' => 'Waterloo');
    $city_data[] = array('accid' => 'CAXX0546', 'name' => 'Windsor');
    $city_data[] = array('accid' => 'CAXX0592', 'name' => 'Shearwater');
    $city_data[] = array('accid' => 'CAXX0597', 'name' => 'Blanc Sablon');
    $city_data[] = array('accid' => 'CAXX0598', 'name' => 'Natashquan');
    $city_data[] = array('accid' => 'CAXX0601', 'name' => 'Cartwright');
    $city_data[] = array('accid' => 'CAXX0602', 'name' => 'Matagami');
    $city_data[] = array('accid' => 'CAXX0615', 'name' => 'Kuujjuaq');
    $city_data[] = array('accid' => 'CAXX0616', 'name' => 'Inukjuak');
    $city_data[] = array('accid' => 'CAXX0626', 'name' => 'Waskaganish');

    ?>

    SOMETHING VERY IMPORTANT WITH POSTNUKE : be sure not to include any blanck line or any other character after the final ?> (This is not special to the weather module and is a very common mistake causing lots of unexpected results)
  • Envoyé: 11.02.2004, 21:56
       
    vedrine
    rang:
    Site Admin Site Admin
    enregistré depuis:
     décembre 2003
    Status:
    hors ligne
    dernière visite:
    12.05.08
    Messages:
    257
    TheodenWell first of great work, finally a weather module or version there of that works.
    One problem I seem to have is either the MSNBC feed is lagging so far behind or they predict weather different than other weather stations since their forcast is off ,quite a bit, compared to 3 other sources, theweathernetwork.com, environment canada and the source the feed that HamWeather uses.

    Please can you make a little experience. Find a city that exhibit the problem, open another browser window and go to
    http://www.msnb...EA_Front.asp
    look for the same city to see if the forecast displayed is the same
    then go to
    http://www.weather.com
    and query weather forecast for the same city to compare with the module's display.
    If the 3 forecasts are the same, it's not a problem with the module but with weather.com (they get their data from different sources, for my city data are unavailable each day at the same hour for 3 ou 4 hours !!)
    MSNBC get their data from weather.com so you should not observe any diffrence between them.
    What would be rather annoying is if the module display something different from MSNBC and weather.com because it will mean that I made an error somewhere so if this is the case, please post me the details. Thanks
  • Envoyé: 14.02.2004, 16:12
    Invité
    rang:
    1
    enregistré depuis:
     décembre 2003
    Status:
    hors ligne
    dernière visite:
    06.03.05
    Messages:
    0
    Sorry folks for being absent for a while.
    Just e-mailed the package for the candian provinces to the webmaster here.
    The cities that don't work anymore, using the old ACID codes, are the ones that MSNBC dropped alltogether.

    rb
  • Envoyé: 14.02.2004, 16:30
    Invité
    rang:
    1
    enregistré depuis:
     décembre 2003
    Status:
    hors ligne
    dernière visite:
    06.03.05
    Messages:
    0
    vedrine
    TheodenWell first of great work, finally a weather module or version there of that works.
    One problem I seem to have is either the MSNBC feed is lagging so far behind or they predict weather different than other weather stations since their forcast is off ,quite a bit, compared to 3 other sources, theweathernetwork.com, environment canada and the source the feed that HamWeather uses.

    Please can you make a little experience. Find a city that exhibit the problem, open another browser window and go to
    http://www.msnb...EA_Front.asp
    look for the same city to see if the forecast displayed is the same
    then go to
    http://www.weather.com
    and query weather forecast for the same city to compare with the module's display.
    If the 3 forecasts are the same, it's not a problem with the module but with weather.com (they get their data from different sources, for my city data are unavailable each day at the same hour for 3 ou 4 hours !!)
    MSNBC get their data from weather.com so you should not observe any diffrence between them.
    What would be rather annoying is if the module display something different from MSNBC and weather.com because it will mean that I made an error somewhere so if this is the case, please post me the details. Thanks



    Ok
    Coburg
    old ACCID

    $city_data[] = array('accid' => 'WNC',
    'name' => 'Coburg');

    No longer listed at MSNBC
    can't find Canadian weather on weather.com :(

    the code on http://www.thew...rnetwork.com is

    CAON0151
    which seems to corespond with the format that HW3-weather uses
    They both show the identical forecast and are only 1 1/2 hours old, while the one coming from MSNBC is 2 1/2 old
  • Envoyé: 14.02.2004, 16:33
    Invité
    rang:
    1
    enregistré depuis:
     décembre 2003
    Status:
    hors ligne
    dernière visite:
    06.03.05
    Messages:
    0
    dr.techThe weathernetwork.com provides cites broken down by provinces and has the most cities/towns/villages of all of the sites.

    http://weather..../indexNS.htm is an example.

    I don't think they use the accid codes. Is there any way to modify this module to work with trheir system?

    Great discussion .. thanks

    agree with you there.
    They seem to have a ton, or is it tonne ;) , of codes, even international ones.
    rb
  • Envoyé: 14.02.2004, 18:07
     
    dr.tech
    enregistré depuis:
     février 2004
    Status:
    hors ligne
    dernière visite:
    02.09.05
    Messages:
    10
    It would be great to have an adaption of the weather module that could tap into this extensive list of Canadian cities and towns.

    L
  • Envoyé: 16.02.2004, 11:07
    Invité
    rang:
    1
    enregistré depuis:
     décembre 2003
    Status:
    hors ligne
    dernière visite:
    06.03.05
    Messages:
    0
    Any idea on when Australian Cities will be available?
  • Envoyé: 16.02.2004, 11:14
     
    dr.tech
    enregistré depuis:
     février 2004
    Status:
    hors ligne
    dernière visite:
    02.09.05
    Messages:
    10
    It probably would be a good idea to start a new topic for Australia so that country-based discussions will be easy to follow. Hopefully interest in your city codes will be as keen as for Canada.

Aller à la page: [-1] 1 - 2

Réponse rapide
 
  • Options
Code:
Couleur de la police:  
Taille de la police: