Uncategorized

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.

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.

Profile Picture for Alan Levine aka CogDog
An early 90s builder of the web and blogging Alan Levine barks at CogDogBlog.com on web storytelling (#ds106 #4life), photography, bending WordPress, and serendipity in the infinite internet river. He thinks it's weird to write about himself in the third person.

Comments

Comments are closed.