Tag Archives: C#

Weather Underground Web API using C#, Part 2

For part 2 of the Weather Underground API post, I’ll be taking weather data, and injecting it into a KML file. The Keyhole Markup Language (KML) is an XML based format that allows geographic data e.g. lines, points, polygons, to be easily seen in compatible viewers.

Using the previous post as a starting point, we’ll be adding:

  • Front Matter. Starts the KML file, defines the encoding, has a concise description of the file.
  • Style Section. Defines the way the balloons and text will look in the KML file.
  • KML Encoding. The information from the Wunderground API call is encapsulated in pertinent KML.
  • System.IO.File. Is used to write the output file.

Continue reading

Weather Underground Web API using C#, Part 1

In the off hours, I’ve been teaching myself C#…a simple enough object oriented language, with the benefit of using the .NET framework. If you’re targeting Windows, it’s incredibly easy…features like file IO and serial port communications work effortlessly.

I have a list of tasks that I complete before I refer to myself as ‘capable’ in a new language:

  • Helloworld
  • Web API Access
  • File IO
  • XML Parsing
  • GUI Creation
  • Serial Communication
  • System Call
  • Directory Management
  • Database Connectivity
  • 3rd Party Library Integration
  • Error Catching/Mitigation
  • Logging

Continue reading