2009-03-30

Weather reporting

As an example practical application of "XML over HTTP" that would look good enough to an end-user... and motivated by the point that my friend was saying he was going to convert one of his old laptops into a digital picture frame... I was working on a "XML over HTTP" application for weather reports.

The weather reports come in XML over HTTP, the idea was that the application chooses an appropriate pretty picture for the weather foretasted for tomorrow, combines it with a little overlay using SVG and outputs a picture that is set as a Windows desktop wallpaper by a third application (I'm thinking Active Desktop or something more secure). This means that when using the application, your desktop wallpaper is a pretty picture that matches the weather that is going to be tomorrow and has all the info on the side in case the picture doesn't mean much to you.

The problem currently was that the weather report comes with 8 levels of cloudiness plus 16 types of weather, which sums up to 128 distinct weather states, which I didn't want to end up finding pictures for. Right now the data structure is made so that the 16 weather states have pictures they default to when separate cloudiness pictures aren't set. This however makes the application dull and boring, when there are not enough pictures entered.

Ultimately in order to make this application work out, it'd have to be a community effort, where a website would allow visitors to enter picture URLs and associate them with different weather states or link them to weather transitions (the application could pick out a picture depending on what weather today is turning into what weather tommorow, for an added sense of realism). The server would then allow the user to pick, or randomly select out a suitable image from the pool and use it for that user's wallpaper. The problem with this scenario is that of course, the weather reports are for Slovenia, and finding a suitably sized community of picture authors is somewhat unlikely.

Still this is an interesting project, I will prepare the code and try to make it as universal as possible, then leave it up to the end-users if they want to make it live or not. The current code is able to interpret a weather forecast and output a picture using SVG. I will still have to add rendering into a format you can display in Windows, and the overlay box with the details.

No comments:

Post a Comment