It would be nice to have this Weather module automatically lookup weather information if a node already has location information (via the Location module).
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | weather_location.patch | 4.63 KB | dman |
It would be nice to have this Weather module automatically lookup weather information if a node already has location information (via the Location module).
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | weather_location.patch | 4.63 KB | dman |
Comments
Comment #1
toddy commentedHi,
thanks for your suggestion. I think it would be necessary to include another special block for this, right? Or would you show the "localized" weather in the system or custom user block, additionally to the current settings?
Comment #2
dave reidI'm guessing that it would most likely have to go in a separate block for an individual node's location weather. Seems like it could get too complex to try and fit it all into one block.
Comment #3
LaurenH commentedThis is a great idea. I've got a site I'm working on for my local hiking group, with nodes that contain information about a particular hiking venue. It'd be great to have some way of including the information into the node (perhaps a block, or perhaps just using CCK & Contemplate) so that the weather status for the node's location would be displayed.
Comment #4
agn507 commentedI agree... this feature seems almost like a must have for a weather module! Hopefully we can see this added soon. Maybe I'll attempt to write a patch for it.
Comment #5
toddy commentedHi,
as I understand it, it's currently not possible to integrate the Weather module with the Location module. The reason is that the location module does not provide ICAO codes, but only postal codes. If there would be latitude and longitude for location information, it might be possible to support this feature.
Regards,
Tobias
Comment #6
dman commentedThe location module does allow (but not require) lat/lon details. It's working fine for me and gmap. Location also apparently supports an estimate of the lat/lon based on placenames (geocoding and location_latlon_rough_[country]() ) but I've not been able to test that.
But given that my nodes DO have the right co-ordinates available, and my project is about geographic information and weather condition logging, I've patched this in, while experimenting with this cool data.
This patch provides another block 'Weather: node location' where if the
$node->location['latitude','longitude']values are present a block shows up with the nearest weather information.Currently, the 'nearest' is calculated on-the-fly using first a rough guess in a SQL lookup, then a mathematically "Great Arc" true distance check.
It may make sense for a node to cache its favorite weather station itself, as this proximity lookup is a bit heavy to be running every pageload.
The distance and direction from the actual weather station is noted in the block display.
This module is heaps of fun! I love the way the data is just out there ... when you know where to look!
Comment #7
toddy commentedHi,
thanks a lot for this patch and the information about latitude and longitude support of the Location module. I'll see how to integrate this into the Weather module.
Regards,
Tobias
Comment #8
toddy commentedThis is fixed in CVS HEAD.
Comment #9
(not verified) commented