Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 454
  • Last Modified:

NOAA Web Service XML

I am making a call to the NOAA web service to retrieve weather info. There is a parameter for getting the icons for the weather for the specified day. The values being reutrned for the icons is a url, which is fine. I am looking to return the text that defines the icons? I cant figure it out? Does anyone know how I can do this?

Im doing this in a VB.NET console app. Its being called a few times a day and being stored in an Oracle table.

Any help would be greatly appreciated
Thanks
JK
0
jknj72
Asked:
jknj72
  • 7
  • 4
  • 2
1 Solution
 
Fernando SotoRetiredCommented:
Hi JK;

What do you mean by this, "I am looking to return the text that defines the icons?", The URL is a link to the actual .jpg image which can be downloaded.
0
 
jknj72Author Commented:
Yes, what Im wondering if I can do is get an summary of the icon like, "Partly Cloudy" or something like that to go along with the url(ex...http://forecast.weather.gov/images/wtf/ra50.jpg)?

Is there a description or name or something like that that would go along with the url?
0
 
Fernando SotoRetiredCommented:
Which of the NOAA digital service are you using and which call are you using to that service?
0
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
jknj72Author Commented:
My parameters and my call to the service are below. I thought the icons param would have a description that goes with the url but I cant seem to figure this out.


Dim params As New NJT.WeatherEngine.gov.weather.graphical.weatherParametersType
        params.maxt = True
        params.mint = True
        params.icons = True
        params.temp = True
        params.rh = True
        params.snow = True
        params.wdir = True
        params.wspd = True
        params.wx = True
        params.appt = True
        params.pop12 = True


        Dim strWeatherXML As String = weather.NDFDgen(w.Latitude, w.Longitude, "time-series", Now, Now.AddDays(5), "e", params)
0
 
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
0
 
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
Sorry, I meant this one http://w1.weather.gov/xml/current_obs/weather.php has the list of what you are looking for.
0
 
jknj72Author Commented:
yeah Ive seen that page but what element, if there is one, will bring back what Im looking for?
0
 
jknj72Author Commented:
I havent seen the new page you just sent though. Is there an element that brings back description? Thanks padas
0
 
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
Just a word of caution.  I have used this webservice and found errors where some of the conditions they use are not listed.  For instance, Mostly Cloudy | Mostly Cloudy with Haze | Mostly Cloudy and Breezy is used for http://weather.gov/images/fcicons/bkn.jpg and
http://weather.gov/images/fcicons/nbkn.jpg.  If you try and look for, "Mostly Cloudy" for example to bring up http://weather.gov/images/fcicons/bkn.jpg during the day, I have seen descriptions that are not mentioned here.  I had to manually add them to my own database.  Just account for what happens if there is no match.
0
 
jknj72Author Commented:
Well I will take that caution into consideration if I can somehow return Mostly Cloudy and Partly Cloudy, etc....How can I get those values? I feel like we are so close!!!
0
 
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
I have just been finding the city I need http://www.weather.gov/ then once I get my city I click on the xml on the lower right and get http://forecast.weather.gov/MapClick.php?lat=36.17160&lon=-86.7848&unit=0&lg=english&FcstType=dwml

From there you just read the xml in your favorite language.  asp.NET or js/jquery.  It would probably be faster to just use client side.
0
 
jknj72Author Commented:
I still dont know how to retreieve it programmtically in vb.net on the client side.

I get the icon url from the nodes like this
dwml/data/parameters/conditions-icon[@type='forecast-NWS']

Do you know what it would be for the descriptions?
0
 
jknj72Author Commented:
close enough...thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 7
  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now