It would be nice to have this Weather module automatically lookup weather information if a node already has location information (via the Location module).

CommentFileSizeAuthor
#6 weather_location.patch4.63 KBdman

Comments

toddy’s picture

Assigned: Unassigned » toddy

Hi,

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?

dave reid’s picture

Version: 4.7.x-2.2 » 6.x-5.x-dev

I'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.

LaurenH’s picture

This 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.

agn507’s picture

I 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.

toddy’s picture

Status: Active » Postponed

Hi,

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

dman’s picture

Status: Postponed » Needs work
StatusFileSize
new4.63 KB

The 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!

toddy’s picture

Hi,

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

toddy’s picture

Status: Needs work » Fixed

This is fixed in CVS HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)