views:

481

answers:

2

I am attempting to get the current weather given a zip code or a set of latitude/longitude coordinates. It appears that best practice to do this (and how NOAA does it) is to get the XML feed for a weather station.

Example: http://www.weather.gov/xml/current_obs/KEDW.xml

The only problem is that NOAA doesn't provide a good way to find the closest weather station given a zip code or coordinates and I did not see any hosted web services out there that will provide this mapping.

Does anyone know of any web services to get the nearest weather station given a zip code or coordinate input? If not, does anyone have any great solutions to look into that provide similar information as NOAA does but takes in a zip code or coordinates?

A: 

i tried your link and instead of City, Street inputed my zip code. It returned the correct location and weather report. It's possible that it's just a poorly-documented API and a city/street parameter replaced with a 5-digit zip will indeed do what you want.

Paul Sasik
+1  A: 
notJim
Thanks for that first link. I think I am going to use some of the NWS REST calls to get forecasts and cache that data. For current, I am going to dynamically get the weather station identifier from Wunderground's API and store them in our DB as needed and based upon a City, State, Country, ZipCode, or Lat/Long pair, I can look up the weather station identifier and call Wunderground or NOAA passing in the identifier to make a quick call to get the current data I need.
Brandon