CDB cat dog-egories:
      

January 29, 2005

Note: CogDogBlog has a new WordPress powered home at http://cogdogblog.com/. All entries from this version have been moved there, so as a guide dog service try finding this article in its new home by title search.

Poking Around Weather via WAP/WML

As a geek happens a lot- I get curious and start poking around on the net, peeking at web page source code. Tonight, I was checking out the NOAA weather forecast for near our cabin and there was a little note near the top:

New! Cell Phone (wap) URL: www.srh.noaa.gov/wml

Now I have a stone age cell phone with no hope of being WAP capable (Wireless Application Protocol) but vaguely recollect how the limited display capabilities require web content in WML form (Wireless Markup Language). Well, see more on the WAP/WML acronym soup from W3Schools.

You can get at info pretty quickly through WAP since it is designed to be just data, structured, and lightweight (the NOAA urls load s-l-o-w on the 28 bps modem speed up here).

So here is what I dug up....


Poking at the XML source of the NOAA WAP site It is some HTML, wrapped inside <card>...</card> tags and I could see that each has a web form like quality and a URL that passes the selections to another script.

The "O" card seems to pass a parameter stid to another URL, and it is asking for an "Ob ID" number, some sort of weather station ID. I took some bad guesses, then did a google on "Ob Site ID NOAA" which got me to a list of NOAA Observation Sites.

<card id="O" title="Enter Ob ID">
<p align="center">
  National Weather<br/>
  Service<br/>
  Southern Region<br/><br/>
  Enter Observation ID:<br/>
  Example: kdfw<br/>
  <input name="stid" format="4M" size="4" maxlength="4" /><br/>
  <a href="/wml/wapob.php?stid=$(stid)">Go to Ob</a><br/>
<br/>
<do type="accept" label="Back" name="Back2">
  <go href="#select" />
</do>
</p>
</card>

Curious about the weather home in Phoenix, the magic code was "kphx", or the URL plucked from the XML above:
http://www.srh.noaa.gov/wml/wapob.php?stid=kphx

which gives the current weather from Phoenix in only 0.7k of data.

Now I had the game figured out, and going to another card, I could make out a URL to pass as a parameter a US zipcode for a current weather forecast, so WAP-ing to
http://www.srh.noaa.gov/wml/wap_zc.php?zc=85544

which not only has current weather in Pine, but links to satellite images (WAP ready I bet) and more info. Of course, I could just poke my geek head out the window and confirm it is snowing (I just did that).

What is the real discovery? Not much. I doubt I will be looking up weather in XML format. But talk about some "small pieces"... this is a half nugget of data that can be accessed not only by WAP able phones but anything that can parse some XML, and the devices that do this manage it seamlessly, you never even see the code. XML has been around for some time, but it is become more transparent and powerful at the same time.

Great. Not only do I still need an iPod, I will be aching for a new phone.

blogged January 29, 2005 10:54 PM :: category [ small pieces ]
Comments About "Poking Around Weather via WAP/WML"
RSS Feed for comments on this entry
RSS Feed for all CDB comments
 

Have you also tried http://www.rssweather.com ?

Commented by: Gerry on January 31, 2005 10:07 AM

 

Absolutely, it has been part of my personal feedrolll for a year:

http://www.rssweather.com/zipcode/85544/wx.php

Commented by: Alan Levine on January 31, 2005 10:39 AM

Spammers Have Force Our Hands...
spamroach.jpg
Note: Those nasty blog-spamming roaches have forced us to take action to prevent their spread- all entries made to this blog will remain open for comments for 30 days after the original posting date. After that, it is old news anyhow, correct?

If you really need to make contact with the chief dog around here, please submit a request via our feedback center