tags:

views:

62

answers:

1

How do I get radar images to a .Net program using this service: http://www.nws.noaa.gov/forecasts/xml/

I literally have no clue where to start. If someone could provide some sample code or maybe direct me to a tutorial of some kind that would be awesome.

Thanks Alot

+3  A: 

Right-click your project, Add Service Reference... Then under Address put in http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl and click Go. Choose a Namespace in the bottom. Then I think you can use it something like:

using AppClass.ServiceReference1;
...
ndfdXMLPortTypeClient service = new ndfdXMLPortTypeClient();
string data = service.NDFDgen(39, -77, productType.timeseries, DateTime.Now, DateTime.Now, new weatherParametersType() { maxt = true });

data is "DWML encoded NDFD data for a point", whatever that means (though I would guess D* Weather Markup Language). I don't know how to decode DWML, or what that data contains. You may need another method to get radar images.

Nelson
That is a great start, thank you very much. Would it be possible for you to elaborate a little bit more on your last line of code though?
Johnny Whisman
@JCwhisman - That depends on how they implemented it. It looked like NDFDgen might "generate" something, so I picked that. You may have to pick another method. Which method to use and what the result type would be documented. I updated my answer a bit.
Nelson
Thank You very much!
Johnny Whisman